# Can_Yaf_Extension **Repository Path**: lostphp/Can_Yaf_Extension ## Basic Information - **Project Name**: Can_Yaf_Extension - **Description**: 建立在[Yaf](https://github.com/laruence/php-yaf) 的基础上,集成了Smarty引擎,加入了封装出来的各种功能类,位于APPLICATION_DIR/library下 - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2017-03-28 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README Can_Yaf_Extension =============== 建立在[Yaf](https://github.com/laruence/php-yaf) 的基础上,集成了Smarty引擎,加入了封装出来的各种功能类,位于APPLICATION_DIR/library下 【更新记录】 - 2017.03.01 Can_Yaf_Extension 建立 【功能说明】 - 缓存:APC/文件/Memcache/Xcache 源自 [prestashop](https://github.com/PrestaShop/PrestaShop) - 数据库:MYSQLi/PDO/MYSQL 源自 [prestashop](https://github.com/PrestaShop/PrestaShop) ,可以通过配置mysql_cache_enable控制是 否cache查询结果 - 邮件支持:PHPMailer+Vemplator,可以通过建立模板文件,用Vemplator渲染后发送邮件 - 淘宝SDK:Taobao/*,将淘宝公布的SDK按照Yaf加载规则稍作了修改 - Smarty:流行好用的视图引擎 - Blowfish/Rijndael:加解密算法 - Captcha:验证码生成工具 - Cookie:强化了安全性的Cookie - Encoder:包含了部分加密算法 - Ftp:Ftp工具类 - ImageCombiner:图片拼接类,支持横向及纵向 - ImageManager:图片处理类 - JSMin:JS压缩 - Log:写日志 - Mail:封装好的发送邮件的静态函数 - MinifyHTML:HTML压缩 - Object:所有与数据库交互的Model都可以继承这个类,完成了add/update/delete/active操作,可以通过setData将数组赋值给类 - Pagination:分页 - PclZip:压缩打包 - Pinyin:将中文转为其拼音 - PSCWS:分词,依赖于 [scws](http://www.xunsearch.com/scws/) ,需要另行安装 - Rpc:远程调用,自创,加密内容后压缩传输 - Taobao:Taobao实例类,在define.inc.php设置好APP_KEY及APP_SECRET,通过Taobao::getInstance()使用 - Tools:一些常用静态方法 - Validate:常用验证方法 - Weixin:集成的微信接口 - PHPExcel:源自 [PHPExcel](http://phpexcel.codeplex.com/),加载规则与Yaf自身加载规则相同,所以去除了它自带的Autoload 【目录说明】 |- index.php //入口文件 |- .htaccess //重写规则 |+ css |+ img |+ js + application |+ controllers |- Error.php //错误控制器 |- Index.php //默认控制器 |+ models //model目录 |+ modules //其他模块 |+ admin //后台 |+ plugins //插件目录 |+ views |+ index //控制器 |- index.phtml //默认视图 |+ error //控制器 |- error.phtml //错误视图 + conf |- application.ini //配置文件 |- defines.inc.php //加密配置 |+ library //本地类库 =============== 【nginx配置】 location ~ [^/]\.php(/|$) { try_files $uri =404; fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_index index.php; include fastcgi.conf; try_files $uri $uri/ /index.php$is_args$args; }