How to create a simple site using PHP Framework yii
What is Yii?
Yes it is!!! The New PHP Framework
which is very fast than all the existing frameworks :)The best MVC Framework now..
Lets see how to create a simple site using yii
I always use Netbeans and Dreamweaver for editing PHP files. When it comes to using Framework I prefer Netbeans, very simple to use Frameworks.
For using yii Framework download yii from here
Now in Netbeans
goto Tools -> plugins -> Downloaded -> Add plugin
Select the downloaded zip file and click install.
You are done with installing yii framework plugin in netbeans
Now to create a site,
click File -> New Project -> PHP -> PHP Application
Then select your localhost folder then click next untill you are prompted to select PHP Frameworks
Select yii Framework !!
Thats it :) You have created a new site yourself feel happy :)
Now a basic introduction to structure of yii, As it is MVC pattern framework
All site control (Actions,Sql commands) will be in controller files - Protected/Controllers
All logic (access controls,restrictions, validations) will in model files - Protected/models
All files which the user can see (login page, registration page,home page) will be called view files
-Protected/views
This makes things clean and safe and powerfull yii library makes life easier :)
Next thing is when you developed your site and want to host it, make sure you have changed this line
yii='E:\yii-1.1.13.e9e4a0\framework\yii.php';
to point to your current framework location in protected/config/main page :)
Thats all folks :) Now you too a web developer !!!
leave your doubts or suggestions in comments section..
ReplyDeleteI like your suggestions they are really helpful. Thank you so much for sharing this post.
PHP Developer Software in India