Laravel Framework Learning Note (i) Environment Construction _php Example

Source: Internet
Author: User
Why choose the Laravel framework, because the Laravel framework is currently the most popular framework for PHP, in-depth research found and the ASP. NET MVC framework is essentially about in functionality. It's just that their implementation is different.

PHP in the development environment under Windows to build

1. Download the PHP address http://windows.php.net/download/Note the relevant version of my server with the iis7.5 32 system

VC11 x86 Non Thread Safe

After decompression into the corresponding directory, configure the php.ini file, here Note the DLL enabled in the relevant configuration, this online has not said much.

2.iis Configuration

I use the fastcgi deployed, need to download Phpmanager https://phpmanager.codeplex.com/

After installing Phpmanager Click on the IIS site will appear phpmanager icon

The following interface will appear after the opening, the related setting function is also relatively simple, it is necessary to note that PHP extensions, this and the above php.ini DLL enabled is consistent.

Configure the Php_wincache.dll to be enabled in IIS fastcgi mode. Remember to enable this.

3. Download the Laravel framework , where you need to download a composer a PHP tool similar to that of NPM.

You will need to select a PHP version when installing. If you need to change the PHP version, reinstall it.

Extract the Laravel compressed package to the Laravel folder, shfit+ right-click in the Laravel folder to open the Command window

Input Compser intsall automatically downloads related dependent components into the vendor folder

Installation of 4.mysql

MySQL installation is not described in detail here, basically not much of a problem.

You may encounter an laravel eloquent ORM modeling error,

Need to put MySQL in the

# Set The SQL mode to strict
#sql-mode= "Strict_trans_tables,no_auto_create_user,no_engine_substitution"

Modified into

Sql-mode= "No_auto_create_user,no_engine_substitution"

Also find solutions on-line if no problem is best.

5. Start configuring the IIS PHP site after all components have been downloaded

As with. NET sites, note that the root directory of the site is not the Laravel folder, but the following public folder.

Configure the host file and the domain name of the Web site.

Configuration complete, click Check Phpinfo () in Phpmanager, view installation

The program pool does not need to change, 2.0 of the integration mode is available,

6. This is basically the installation of all components .

Access the site domain name set up in the previous step. You can see the Laravel welcome page.

Here is a special note, because the URL generated by Laravel is also without a suffix, there will be a 404 error,

Need to install IIS Url Rewrite component

After the installation is complete

Enter the rewrite interface and click on the right to import rules

Then select the. htaccess file under the public file

Apply the rules when you're done importing.

The above steps basically build up Laravel in Windows IIS run environment

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.