Few questions before I begin.


I am new to yii (and frameworks in general for that matter) and have a few questions before I begin.

Question #1

I have been following along with a few videos that go over the initial setup for yii on a windows system and most of them talk about adding php.exe and the yii framework folders to your environmental variables paths in windows and my question is if this even necessary or not ?

As far as I can tell the only reason you would want to do this is so you do not have to type the full path names to php.exe and or your yii folders when creating a new app, is this correct or am I missing something ?

Question #2

The quick install guide mentions the following tip when installing yii on your system.

The question here is pretty obvious, which file do I need to keep in my web accessible directory to make yii work properly ?

Question #3

I will be doing all of my development on my local machine which is not accessible to the internet, does the tip above even apply to situations like these?

Question #4

What is the purpose of the yiic.bat file that is created every time you make a new skeleton app ?

I mean the yii/framework directory already has this file inside of it, so what is the reason you would need a copy of this file located in your apps directory as well.



It is not if you wont use command line

with command line its is possible to create applications, run command applications and more

index.php and if you will use prettyUrls .htaccess

any folder that you want to be acessible, like assets, css, js (assets folder is required)

Yep, localhost is the same of an internet host, the only difference is that is not accesible on the web (only if you want and with the right configuration)

yiic.bat comes with the Yii library and is the script required to run command line commands

Thanks for the reply but I think you misunderstood a couple of my questions so I will try to be more clear.

About Question #3

Can you elaborate as to the reason why this needed on my local machine ? I mean the machine is not even connected to the internet. I do not host my stuff in the "cloud" have no need for an online repository or w/e people use these days. Everything will be stored on my local machine and the only thing that will be on the internet will be the final version of my application, so why do I need to be concerned where the files reside in a situation such as this ?

About Question #4

I was not asking what yiic.bat was or why I needed it, I was asking why is a copy of it created in your apps folder everytime you create a new app when there is already a version of this file in the yii/framework directory. Does the version that is created for you when you make a new app do something different then the one in the yii/framework directory or what ?

Thx Again,


You don’t this security measure to work on localhost. For production server it is recommended.

Altho, I prefer to work on localhost using the same enviroment and folder structure as the production server.

Its a copy of the file.

Yii creates a whole application that is independent, thats why the need to recreate the file.

would you explain this more details, plz?

i found this .htaccess (\\yii\framework\) but where is the index.php?

which one of index.php, folder assets, css, js ?

i should copy all of those to my web root directory, right?

so, if i use wamp then i need to copy those to my \\wamp\www ,right?

i’m a newbie here so plz help me.


Could you read the Definitive Guide to Yii

If you haven’t yet read it, you are just wasting our time.

But, in essence:

You use the command line to create a new application.

Yii will generate a skeleton for you.

Don’t bother to look in yii/framework for anything (not yet).

Read the guide first.

Then ask.;)

yes, i already have.

but like "nos" said : it just said " Tip: Yii does not need to be installed under a Web-accessible directory. A Yii application has one entry script which is usually the only file that needs to be exposed to Web users. "

and no details information about it.