Yii-yiic使用

原文在:http://blog.sina.com.cn/s/blog_862b12fb0101n00v.html



yii提供了强大的命令行工具来快速的创建相关组件和应用。
下面就来讲解用yiic工具快速创建yii应用
我的web目录在d:\ EasyPHP-DevServer\data\localweb下;

yiiframework在D:\EasyPHP-DevServer\data\localweb\yii\framework
win平台
运行cmd命令
*切换到D盘
cd 到farmwork 目录下
yiic webapp ../testapp/ ==》》*创建一个testapp应用在framework上一级目录【回车】
Create a Web application under 'D:\www\yii\testapp'? [Yes|No] y
*【选择y/yes回车】



Microsoft Windows XP [版本 5.1.2600]

(C) 版权所有 1985-2001 MicrosoftCorp.


H:\>d:


D:\>cd EasyPHP-DevServer\data\localweb\yii\framework


D:\EasyPHP-DevServer\data\localweb\yii\framework>yiic webapp ../testapp/

Create a Web applicationunder 'D:\EasyPHP-DevServer\data\localweb\yii\testapp'?

(yes|no) [no]:y

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/assets

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/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 D:/EasyPHP-DevServer/data/localweb/yii/testapp/images

generate index-test.php

generate index.php

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected

generate protected/.htaccess

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/commands

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/commands/sh

ell

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/components

generate protected/components/Controller.php

generate protected/components/UserIdentity.php

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/config

generate protected/config/console.php

generate protected/config/main.php

generate protected/config/test.php

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/controllers


generateprotected/controllers/SiteController.php

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/data

generate protected/data/schema.mysql.sql

generate protected/data/schema.sqlite.sql

generate protected/data/testdrive.db

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/extensions

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/messages

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/migrations

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/models

generate protected/models/ContactForm.php

generate protected/models/LoginForm.php

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/runtime

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/tests

generate protected/tests/bootstrap.php

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/tests/fixtu

res

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/tests/funct

ional

generateprotected/tests/functional/SiteTest.php

generate protected/tests/phpunit.xml

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/tests/repor

t

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/tests/unit

generate protected/tests/WebTestCase.php

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/vendor

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/views

mkdir D:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/views/layou

ts

generate protected/views/layouts/column1.php

generate protected/views/layouts/column2.php

generate protected/views/layouts/main.php

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/views/site

generate protected/views/site/contact.php

generate protected/views/site/error.php

generate protected/views/site/index.php

generate protected/views/site/login.php

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/protected/views/site/

pages

generateprotected/views/site/pages/about.php

generate protected/yiic

generate protected/yiic.bat

generate protected/yiic.php

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/themes

mkdir D:/EasyPHP-DevServer/data/localweb/yii/testapp/themes/classic

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/themes/classic/views

generate themes/classic/views/.htaccess

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/themes/classic/views/

layouts

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/themes/classic/views/

site

mkdirD:/EasyPHP-DevServer/data/localweb/yii/testapp/themes/classic/views/

system


Your application hasbeen created successfully under D:\EasyPHP-DevServer\data\l

ocalweb\yii\testapp.


D:\EasyPHP-DevServer\data\localweb\yii\framework>

ok 到这里yii新应用已经创建成功



你可能感兴趣的:(local,framework,create,yiic)