For demonstration purposes only. Do not use this code in a production environment for security and performance issues.
More info: http://www.aftleuven.be/event/web-development-track-workshop-1/
Joind.in link: https://joind.in/event/php-leuven---event-1-introduction-to-php--fast-frameworks/introduction-to-silex
Sign up at http://phpbelgium.be/ and contact metalarend to keep using the server you were working on during the workshop.
-
Mac OS X or Linux recommended.
-
PHP 5.4+ (PHP 5.5+ recommended)
- Mac OS X: PHP comes pre-installed. Yay!
- Linux: Setup guide (advanced) or use XAMPP (easy).
- Windows: Setup guide (advanced) or use XAMPP (easy).
-
Composer (https://getcomposer.org)
https://github.com/2dotstwice/aft-php-silex/archive/master.zip
- Unzip the downloaded file.
- Open the Terminal / Console / ...
- Run
composer install
cd
to theweb
folder of the unzipped download.- Run
php -S localhost:8080
- Open
http://localhost:8080/hello
in your browser. - You should see
Hello world!
Make the web/files
folder writable by PHP.
- Mac OS X / Linux:
chmod 777 web/files
. - Windows: Try http://stackoverflow.com/questions/8402415/xampp-on-windows-7-set-chmod, otherwise Google is your friend.
Set date.timezone
in php.ini
to Europe/Brussels
. (If you know where the php.ini
file is located.)
Otherwise put the following code at the top of your index.php
:
ini_set('date.timezone', 'Europe/Brussels');