# yaf_demo **Repository Path**: Wei303/yaf_demo ## Basic Information - **Project Name**: yaf_demo - **Description**: yaf框架demo, 如何连接数据库,配置smarty模板等 - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-12-13 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # yaf_demo #### 介绍 yaf框架demo, 如何连接数据库,配置smarty模板等 #### 软件架构 yaf框架 #### 安装教程 1. 请先安装yaf框架: https://www.jianshu.com/p/1460d2296f19 2. php.ini中的配置: ``` extension=php_yaf yaf.name_suffix=1 yaf.forward_limit=5 yaf.environ=product yaf.cache_config=0 yaf.use_spl_autoload=1 yaf.use_namespace=0 ``` 配置文件的说明: http://www.laruence.com/manual/yaf.ini.html 3. nginx中的配置: 域名:dev.www.yaf.cc ``` server { listen 80; server_name dev.www.yaf.cc; root "D:/web_project/dev.www.yaf.cc/public"; index index.php index.html index.htm; if (!-e $request_filename) { rewrite ^/(.*) /index.php/$1 last; } ...... } ``` 4. 其他配置参数在 application.ini文件中 #### 使用说明 http://dev.www.yaf.cc/ #application/Bootstrap.php中关于smarty.php中的配置去掉注释 http://dev.www.yaf.cc/smarty/index