This article describes the Win7 installation of the PHP framework Yii method. Share to everyone for your reference, specific as follows:
Someone asked me win7 installation Yii always error, spent 10 minutes installed, now do the self-learning ability of the program so bad? I am not very cold to the framework of these things, the framework of this kind of things, individuals feel less efficient, integrated more things, and there are many we do not need. If you have not developed a framework, there are some benefits to the framework, you can standardize the code.
1. Download Yii
http://www.yiiframework.com/download/
2, using YIIC to generate a web directory
C:\windows\system32>f:/wamp/www/yii/framework/yiic WebApp f:/wamp/www/web
Create A Web application under ' F:\ Wamp\www\web '? [Yes|no] Yes
mkdir f:/wamp/www/web/assets
mkdir f:/wamp/www/web/css
generate css/bg.gif
generate Css/form.css
generate css/ie.css
generate css/main.css
generate css/print.css
generate css/ Screen.css
mkdir f:/wamp/www/web/images
Generate index-test.php
If prompted:Php.exe is not an internal command , it is missing the environment variable.
The workaround is as follows:
" My Computer" right ==> "Properties" ==> "Advanced" ==> "Environment variables", find the path variable, double-click, add at the end, the path of PHP executable file, is the file path of. exe .
Here's what I'm adding.
F:\wamp\php; F:\wamp\mysql\bin\; F:\wamp\Apache2\bin\
And then save the line.
C:\windows\system32>echo%PATH%
Check the above command to see if there are any environment variables just added, if not, command line set Path=c: Close the cmd window and reopen it.
After a look at the production of Yii directory, the sense of the catalog is clearer, put class,model,view,css/js, pictures and so are more clear, but a little, let me feel is not very cool, that is, PHP and HTML is mixed together, there is no template. If YII officials do not have plug-ins, it is more depressing. Mixed write is not very good, the website revision is very lets the person collapse.
More about the YII framework related content readers can view the site topics: "Yii framework Introduction and common skills Summary
I hope this article will help you with the PHP program design based on the YII framework.