Phpyii framework creation project

Source: Internet
Author: User
We recommend that you modify the command to PHP_COMMANDE: wampbinphpphp5.4.16php.exe (E: The Directory corresponding to php.exe in the "wampbinphp5.4.16php.exe1_red" directory so that the command to run yii does not report an error.

The first step is to download the framework windows and then open yiic. bat is php_commandmongophp.exe by default. We recommend that you change it to PHP_COMMAND = E: \ wamp \ bin \ php \ php5.4.16 \ php.exe (E: \ wamp \ bin \ php \ php5.4.16 \ php.exe‑red php.exe directory. In this way, running the cmd command of yii will not report errors in cmd.

The first step is to downloadFramework

Windows

Enable yiic. bat

The default value is php_commandcmdphp.exe.

We recommend that you change it to PHP_COMMAND = E: \ wamp \ bin \ php \ php5.4.16 \ php.exe (E: \ wamp \ bin \ php \ php5.4.16 \ php.exe‑red php.exe directory. In this way, the cmd command for running yii will not report an error.

Run the following command in cmd:

First find yiic and then webapp is what you wantCreateProjectPath

C: \ Users \ Administrator> E: \ wamp \ www \ yii \ framework \ yiic webapp E: \ wamp \ www \ yii \ shop

If both the command and path are correct, the following prompt is displayed: Enter yes.Create

Create a Web application under 'e: \ wamp \ www \ yii \ shop '? (Yes | no) [no]: yes

Finally, we can see the following statement.ProjectCreateSucceeded

Your application has been created successfully under E: \ wamp \ www \ yii \ shop.

Then, test it in the browser to see that the instructions are OK.

Http: // localhost/yii/shop/

Next is linux.

DownloadFrameworkI used ftp to upload the file.

To decompress a file in. ZIP format, you can use the unzip command, for example, unzip yii.zip.

If unzip is not installed, use apt-get or yum to install it.

After decompression, make sure that the permission for the yii directory can be granted to 755 or 777. Here, the permission is 777 755. I also tested that the following code can be executed:CreateCommand

Then run/usr/share/nginx/www/zjl/yii/framework/yiic webapp testyii (the testyii name is determined based on your current path, it is best to write an absolute path, as shown below)

/Usr/share/nginx/www/zjl/yii/framework/yiic webapp/usr/share/nginx/www/testyii

When I run the command here, a warning occurs: PHP Deprecated: Comments starting with '#' are deprecated in/etc/php5/cli/conf. d/ming. ini on line 1 in Unknown on line 0.

If the command on windows is correct, enter yes.

Create a Web application under '/usr/share/nginx/www/zjl/testyii '? (Yes | no) [no]: yes

Then you can see the Your application has been created successfully under/usr/share/nginx/www/zjl/testyii.

Then test htpp: // localhost/zjl/testyii/in the browser address/

So far all OK, then you can learn yii.

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.