07 2013 档案
摘要:1、如果action不需要输出视图文件(如果ajax请求之类的),只需要在action里面加Yaf\DisPatcher::getInstance()->disableView();2、获取客户端请求的参数:$this->getRequest()->getParam("name");
阅读全文
摘要:这个是由于PIL没有编译freetype导致的查看 lib/python2.7/site-packages/PIL/看看 _imagingft.so 是否存在# 需要先安装jpeg库wget http://www.ijg.org/files/jpegsrc.v7.tar.gztar -zxvf jpegsrc.v7.tar.gzcd jpeg-7CC="gcc -arch x86_64"./configure --enable-shared --enable-staticmakemake install# 然后再安装PIL库让PIL支持freetype的方法1、安装free
阅读全文
摘要:由于yaf只是一个web框架,只负责处理web请求之类的基本功能,相当简洁,连db库都没有。于是试着把zend 2.2的db库,form库,validator库与yaf结合,写了一个demo。因为zend 2.2框架的命名空间跟yaf一样,所以用起来相当方便。 下面是demo的文件架构,参照yaf手册建立的,是一个标准的架构:├── application│ ├── Bootstrap.php│ ├── controllers│ │ ├── Album.php│ │ ├── Application.php│ │ ├── Blogs.php│ │ ├...
阅读全文
摘要:yaf默认的配置是着这样的:
yaf.baseUri=”/”
;默认的脚本后缀名
yaf.ext=php
;默认的视图文件后缀名
yaf.view.ext=phtml
yaf.dispatcher.defaultModule=Index
yaf.dispatcher.defaultController=Index
yaf.dispatcher.defaultAction=index
yaf.modules=Index
阅读全文
摘要:目录结构+ public //网站根目录 - index.php //入口文件 - .htaccess //重写规则 + conf |- application.ini //配置文件 application/ + controllers - Index.php //默认控制器 + views |+ index //控制器 - index.phtml //默认视图 + modules //其他模块 - library //组件目录 - models //model目录 - plugins //插件目录入口文件入口...
阅读全文
摘要:pecl里面的yaf最新测试版http://pecl.php.net/package/Yaf安装pcre要先安装pcre, Debian ubuntu执行sudo apt-get install libpcre3 libpcre3-dev$ sudo pecl install apc安装Yaf下载Yaf,解压后进入yaf目录(有c文件的目录),执行以下命令:$ phpize$ ./configure --with-php-config=/usr/bin/php-config$ make$ sudo make install路径/usr/bin/php-config要根据系统所配置的路径。配置p
阅读全文