
Yaf
1.yaf安装
2.yaf 如何引用 composer中的类
3.yaf把index.php移到public 目录下
4.Yaf多模块开发
5.yaf自动生成目录
廖圣平
高级技术经理 +v:juzhen321
展开
-
Yaf - Demo 项目
git 地址: https://github.com/liaoshengping/yaf_init 功能专栏 https://blog.youkuaiyun.com/qq_22823581/column/info/33813 步骤: 1.安装yaf 环境 2.安装yaconf环境 3.导入sql 文件 功能: 1.多模块开发 2.index 移到public 目录下 3.添加公用方法function.php ...原创 2019-02-15 16:23:13 · 1919 阅读 · 0 评论 -
yaf创建公共方法
1。在application 创建common 新建文件 function.php 2. 在bootstrap.php 中添加 public function _initCommonFunctions(){ // 注册自定义加载地址 Yaf_Loader::import(Yaf_Application::app()->getConfig()->...原创 2019-02-15 14:41:08 · 629 阅读 · 0 评论 -
yaf安装
https://www.cnblogs.com/chengshan/p/7246242.html转载 2019-02-14 21:20:15 · 734 阅读 · 0 评论 -
yaf 如何引用 composer中的类||管理composer
先下载一个你要的compsoer 包,根目录自动生成vender文件夹 在index.php 中添加 require "../vendor/autoload.php";原创 2019-02-14 18:13:02 · 1793 阅读 · 0 评论 -
yaf把index.php移到public 目录下
在 application 目录下创建public 把index.php 移动到public 如果是apche 把.htaccess也移进去 修改index.php 把 define('APPLICATION_PATH', dirname(__FILE__)); 替换成: define('APPLICATION_PATH', str_replace(['/public','\public'],''...原创 2019-02-14 18:09:10 · 654 阅读 · 1 评论 -
yaf自动生成目录
1.如果使用编译安装的,已经下载了源码可以省略这步,直接下一步 git clone https://github.com/laruence/yaf.git 进入tools/cg 执行: php ./yaf_cg liaosp 出现done 说明,已经生成目录了 这时候会多出一个文件夹: output 进入output 目录,可以看到我们刚刚创建的目录, 可以把他复制出来,作为项目进行...原创 2019-02-14 16:55:17 · 528 阅读 · 0 评论 -
Yaf多模块开发
在application目录下 新建文件夹:modules 在 application/modules 新建一个Api/controllers 模块 在 application/modules/Api/controllers 新建Index.php <?php class IndexController extends Yaf_Controller_Abstract { publi...原创 2019-02-14 17:27:33 · 1219 阅读 · 0 评论