yaf 生成项目

yaf 生成项目

生成项目

  • 一定需要在安装yaf的php版本环境中执行该语句
zb@zb-computer:/yaf-3.0.7/tools/cg$ ls
output  README.md  templates  templatesNamespace  yaf_cg

zb@zb-computer:/yaf-3.0.7/tools/cg$ pwd  /*在指定目录下才可执行*/
/yaf-3.0.7/tools/cg

sudo /usr/local/php7.2/bin/php yaf_cg yaf_model(新项目名称)

找到生成的项目目录

zb@zb-computer:/yaf-3.0.7/tools/cg/output$ ls
yaf_model  
如果遇到错误
yaf在命令行模式下出现PHP Fatal error: Class 'Yaf_Application' not found的解决办法
注意是不是在你安装yaf的php 环境跑该项目的.
原文地址:https://www.cnblogs.com/pansidong/p/12090656.html