PHP background Development (ii) LARAVEL framework
In order to improve the background development efficiency, often need to choose a set of suitable for their own development framework, therefore, chose a more functional laravel framework, carefully learned, feel and Python language framework Django very similar.
Laravel Frame
Laravel is a Web application development framework that has an expressive and concise syntax and provides tools or features that are often used in development processes such as validation (authentication), routing (routing), Session, and caching (caching).
Frame Mount installation composerhttp://docs.phpcomposer.com/download/
Curl-ss https://Getcomposer.org/installer | php
MV Composer.phar/usr/bin/composer
Because of the foreign scene is not stable, so connected to the domestic scene, the specific method reference: http://pkg.phpcomposer.com/. (Select a configuration method for method 1)
Installing Laravel
Install Lavarel via composer.
" laravel/installer=~1.1 "
~/.composer/vendor/bin
Add the paths to the PATH environment variable so that the laravel
executable file can be found by the command line.
Ln -S ~/.composer/vendor/bin/laravel/usr/local/bin/laravel
Create a new project installation dependent library
Install start MCrypt PHP Extension
sudo Install php5-mcryptsudo php5enmod mcrypt
Starting the Mod_rewrite module
The usual situation is to modify the level two route, there will be 404 cases, the workaround is to start the module.
sudo a2enmod rewrite
Laravel Installer Installation
Laravel New Demo
Composer create-project Command Installation
Composer Create-project Laravel/laravel Project_Name
Free Installation Download Complete project
Click on the link below to download the file, version 4.2
Http://files.cnblogs.com/files/coder2012/complete-laravel4-master.zip
Configuring Apache with Laravel
Modifying a configuration file apache2.conf
vim/etc/apache2/apache2.conf Modify and add content:<directory/> Options followsymlinks AllowOverride all </Directory><Directory/opt/work/laravel/public> Options Indexes FollowSymLinks allowoverride All Require all granted</Directory>
Modifying a configuration file 000-default.conf
vim/etc/apache2/sites-available/-/opt/work/laravel/public
Restart Apache
/etc/init.d/apache2 restart
Access http://localhost/, if seen as a tablet, indicates success.
PHP background Development (ii) LARAVEL framework