ZendFramework部署项目 | 如何使用ZF tools

zf create project myzf 将创建一个新的ZF工程.

zf create action add index 在index controller 中创建一个add action

 

Zend_Tool for windows:

 

1、在C盘下面创建一个新的目录zendframework,如c:/zendframework

2、从网上下载ZendFramework-1.8.0-minimal.zip,然后解压就会出来一个bin文件夹和一个library文件夹,把这两个文件夹拷贝到c:/zendframework中。

3、把c:/zendframework/bin添加到环境变量中,右击“我的电脑”=>“属性”=>“高级”=>“环境变量”,双击path,然后把c:/zendframework/bin添加进去。完成。

 

Zend_Tool for OS X (Linux is similar)
• Extract the downloaded archive file, ZendFramework-1.8.0b1-minimal.zip in your Downloads
directory by double clicking on it.
• Copy to /usr/local/ZendFrameworkCli by opening Terminal and typing:
sudo cp -r ~/Downloads/ZendFramework-1.8.0-minimal /usr/local/
ZendFrameworkCli
• Edit your bash profile to provide an alias:
• From Terminal, type: open ~/.bash_profile
• Add alias zf=/usr/local/ZendFrameworkCli/bin/zf.sh to the end of the file
• Save and exit TextEdit.
• Exit Terminal.

 

在bin目录中有两个文件:zf.bat和zf.sh,zf.bat是在windows中运行的,另一个是在linux中运行的。

 

测试一下,进入命令行,输入:zf show version

它将显示Zend Framework Version: 1.8.0

 

zf create project myzf 将创建一个新的ZF工程.

zf create action add index 在index controller 中创建一个add action

 

其它的详细信息请参考:http://framework.zend.com/manual/en/zend.tool.framework.html



发表评论

邮箱地址不会被公开。