. Net to phplaraval framework learning series,. netlaraval_PHP tutorial

Source: Internet
Author: User
Tags php development environment
. Net to phplaraval framework learning series,. netlaraval .. Net to phplaraval framework learning series,. netlaraval has not written any blog before, maybe the article structure is chaotic, think of where to write. I mainly write down my learning experience. net to the php laraval framework learning series,. netlaraval

I have never written any blogs before, and the structure of the articles may be chaotic.

I mainly write down my learning experience.

The reason why laravel framework is selected is that laravel framework is currently the most popular framework in Php. after in-depth research, it is found that the function of the asp.net mvc framework is basically the same as that of the former. But their implementation methods are different.

Php development environment in windows

1. Download php address http://windows.php.net/download/ pay attention to the related version, my server with iis7.5 32 system

VC11 x86 Non Thread Safe (02:43:40)

Decompress the package and put it in the corresponding directory to configure the php. ini file. pay attention to the dll-enabled configuration here. I will not talk about it on the Internet.

2. iis configuration

I deploy with fastcgi and need to download phpmanager https://phpmanager.codeplex.com/

After installing phpmanager, click the iis Site and the phpmanager icon will appear.

After clicking open, the following interface will appear, and the related setting functions are relatively simple. Note that php extensions is used, which is consistent with the dll enabled in php. ini above.

Enable php_wincache.dll in iis fastcgi mode. remember to enable this.

3. download the laravel framework. here you need to download a composer php tool similar to npm.

Select the php version for installation. If you need to change the php version, reinstall it.

Decompress the laravel package to the laravel folder and right-click shfit + in the laravel folder to open the command window.

Entering compser intsall will automatically download the relevant dependent components to the vendor folder.

4. install mysql

The installation of mysql is not described in detail here, and there is basically no major problem.

A laravel Eloquent ORM modeling error may be reported later,

In mysql

# Set the SQL mode to strict
# SQL-mode = "STRICT_TRANS_TABLES, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION"

Modify

SQL-mode = "NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION"

It is also the best way to find a solution online, if there is no problem.

5. start to configure the iis php site after all components are downloaded.

The configuration is the same as that of the. net site. Note that the root directory of the site is not the laravel folder, but the public folder below.

Configure the host file and the domain name of the website.

After the configuration is complete, click check phpinfo () in phpmanager to view the installation.

The application pool does not need to be changed. the integration mode of 2.0 is enough,

6. install all the components.

Access the website domain name set in the previous step. The laravel welcome page is displayed.

Note that the url generated by laravel does not contain a suffix and the 404 error may occur,

Install the IIS Url Rewrite component

After installation is complete

On the rewrite page, click import rules on the right.

Select the. htaccess file under the public file.

After the import, apply the rules.

The above steps basically complete the setup of laravel running environment in window iis


After three years of development, how can net programmers switch to php?

More technical skills
Learning PHP doesn't have to give up. net.
It's not easy to make the best of beautiful pages.
No one will use any program
You only need to do what you are best.
 

Asked if net to PHP should be completely rewritten?

. Net to PHP needs to be completely rewritten.
However, with the original framework structure, rewriting is much faster than new development.
Programmers are required to be proficient in. NET and PHP languages.

Databases are complex issues. It mainly refers to data conversion.
This depends on the programmer's technology. The conversion time depends on the size of the database and the complexity of the data structure.

Generally, if the data structure is self-developed, it will soon be converted.
A maximum of one week is allowed.

The laraval framework Learning Series. netlaraval hasn't written any blogs before. maybe the structure of the article is messy and you can think of where to write it. I mainly write down my learning experience...

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.