To use this tool to create your first Yii application, open up a shell window,
and navigate to a place in your filesystem where you will want to create your
application's folder structure. For the purpose of this demo application, we will
assume the following:
• YiiRoot is the folder where you have installed Yii
• WebRoot is configured as the document root of your web server
• From your command line, change to your WebRoot folder and execute
the following:
% cd WebRoot
% YiiRoot/framework/yiic webapp demo
Create a Web application under '/Webroot/demo'? [Yes|No]
Yes
mkdir /WebRoot/demo
mkdir /WebRoot/demo/assets
mkdir /WebRoot/demo/css
generate css/bg.gif
generate css/form.css
generate css/main.css
Your application has been created successfully under /Webroot/demo. The webapp
command is used to create a brand new Yii web application. It takes just a single
argument to specify either the absolute or relative path to the folder in which the
application should be created. The result is the generation of all the needed folders
and files to provide a default Yii web application skeleton.
Now we can change into the newly created demo folder and look at what was created
for us:
% cd demo
% ls –p
assets/ images/ index.php themes/
css/ index-test.php protected/
A description of the high-level items that were automatically created is shown
as follows:
demo/
index.php Web application entry script file
index-test.php entry script file for the functional tests
assets/ containing published resource files
and navigate to a place in your filesystem where you will want to create your
application's folder structure. For the purpose of this demo application, we will
assume the following:
• YiiRoot is the folder where you have installed Yii
• WebRoot is configured as the document root of your web server
• From your command line, change to your WebRoot folder and execute
the following:
% cd WebRoot
% YiiRoot/framework/yiic webapp demo
Create a Web application under '/Webroot/demo'? [Yes|No]
Yes
mkdir /WebRoot/demo
mkdir /WebRoot/demo/assets
mkdir /WebRoot/demo/css
generate css/bg.gif
generate css/form.css
generate css/main.css
Your application has been created successfully under /Webroot/demo. The webapp
command is used to create a brand new Yii web application. It takes just a single
argument to specify either the absolute or relative path to the folder in which the
application should be created. The result is the generation of all the needed folders
and files to provide a default Yii web application skeleton.
Now we can change into the newly created demo folder and look at what was created
for us:
% cd demo
% ls –p
assets/ images/ index.php themes/
css/ index-test.php protected/
A description of the high-level items that were automatically created is shown
as follows:
demo/
index.php Web application entry script file
index-test.php entry script file for the functional tests
assets/ containing published resource files
No comments:
Post a Comment