Hello everyone. In this tutorial we will be looking at setting up the Yii framework and create our skeleton app step by step. Lets begin.
Firstly, we need to download the Yii framework. This can be done from the Yii Framework website. When the download is complete, unzip the file and you will see a folder containing:
- and some legal mumbo jumbo & other stuff
The only folder we are interested in is the framework folder. Copy this folder and go to your localhost. Paste the yii framework folder in a new folder where we are going to setup our application, in this tutorial we are using: localhost/yii-demo
Cool, Now open up your command prompt and navigate to the localhost/yii-demo/framework (e.g : c:\wamp\www\yii-demo\framework
Now type in: yiic webapp c:\wamp/www/myFirstYiiApp This will ask you if you want to “Create we application under ‘C:\wamp\www\myFirstYiiApp’? [Yes:No]“
We do want to so type in “yes”. Some of you might get an error at this point saying something about php or something like that (great tutorial right?). That simply means you don’t have php setup as an environment variable.
To fix this:
“Open the Environment Variables window by going to: Start -> My Computer (right click!) -> Advanced Tab -> Environment Variables -> Click Path in System variables -> Edit.
That bit is stolen from the Yii wiki page, thanks.