Skip to content

Files

Latest commit

e9f9190 · Jun 10, 2018

History

History

formdemo

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Sep 29, 2016
Jul 21, 2016
Jun 10, 2018
Sep 18, 2016
Sep 18, 2016
Jul 21, 2016
Jul 21, 2016
Nov 12, 2016
Jun 6, 2018
Aug 12, 2016
Jul 21, 2016
Aug 9, 2016
Jul 21, 2016
Jul 21, 2016

README.md

Form Demo Sample

This sample is based on the Hello World sample. It shows how to:

  • Create a form model
  • Use the form model in a controller
  • Render the form with special form view helpers
  • Use form security elements (CAPTCHA, CSRF)
  • Upload files with forms

Installation

You need to have Apache 2.4 HTTP server, PHP v.5.6 or later plus gd and mbstring PHP extensions.

Download the sample to some directory (it can be your home dir or /var/www/html) and run Composer as follows:

php composer.phar install

The command above will install the dependencies (Zend Framework).

Adjust permissions for public/img/captcha directory:

sudo chown -R www-data:www-data public/img/captcha
sudo chown -R 775 public/img/captcha 

Then create an Apache virtual host. It should look like below:

<VirtualHost *:80>
    DocumentRoot /path/to/formdemo/public
    
	<Directory /path/to/formdemo/public/>
        DirectoryIndex index.php
        AllowOverride All
        Require all granted
    </Directory>

</VirtualHost>

Now you should be able to see the Form Demo website by visiting the link "http://localhost/".

License

This code is provided under the BSD-like license.

Contributing

If you found a mistake or a bug, please report it using the Issues page. Your feedback is highly appreciated.