pecl里面的yaf最新测试版http://pecl.php.net/package/Yaf
安装pcre
要先安装pcre, Debian ubuntu执行
<span sudo</span> apt-get <span install</span> libpcre3 libpcre3-dev
$ <span sudo</span> pecl <span install</span> apc
安装Yaf
下载Yaf,解压后进入yaf目录(有c文件的目录),执行以下命令:
<span $ phpize $ .</span>/configure --with-php-config=/usr/bin/php-<span config $ </span><span make</span><span $ </span><span sudo</span> <span make</span> <span install</span>
<span 路径/usr/bin/php-config要根据系统所配置的路径。</span>
配置php.ini文件
在php.ini文件末尾添加
<span ;yaf Framework extension</span>=<span yaf.so yaf.environ</span>=<span "</span><span product</span><span "</span><span yaf.use_spl_autoload</span>=<span 1</span><span yaf.use_namespace</span>=<span 1</span>
表 2.2. Yaf 配置选项
选项名称 | 默认值 | 可修改范围 | 更新记录 |
---|---|---|---|
yaf.environ | product | PHP_INI_ALL | 环境名称, 当用INI作为Yaf的配置文件时, 这个指明了Yaf将要在INI配置中读取的节的名字 |
yaf.library | NULL | PHP_INI_ALL | 全局类库的目录路径 |
yaf.cache_config | 0 | PHP_INI_SYSTEM | 是否缓存配置文件(只针对INI配置文件生效), 打开此选项可在复杂配置的情况下提高性能 |
yaf.name_suffix | 1 | PHP_INI_ALL | 在处理Controller, Action, Plugin, Model的时候, 类名中关键信息是否是后缀式, 比如UserModel, 而在前缀模式下则是ModelUser |
yaf.name_separator | "" | PHP_INI_ALL | 在处理Controller, Action, Plugin, Model的时候, 前缀和名字之间的分隔符, 默认为空, 也就是UserPlugin, 加入设置为"_", 则判断的依据就会变成:"User_Plugin", 这个主要是为了兼容ST已有的命名规范 |
yaf.forward_limit | 5 | PHP_INI_ALL | forward最大嵌套深度 |
yaf.use_namespace | 0 | PHP_INI_SYSTEM | 开启的情况下, Yaf将会使用命名空间方式注册自己的类, 比如Yaf_Application将会变成Yaf\Application |
yaf.use_spl_autoload | 0 | PHP_INI_ALL | 开启的情况下, Yaf在加载不成功的情况下, 会继续让PHP的自动加载函数加载, 从性能考虑, 除非特殊情况, 否则保持这个选项关闭 |

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SublimeText3 Chinese version
Chinese version, very easy to use

SublimeText3 Linux new version
SublimeText3 Linux latest version

Zend Studio 13.0.1
Powerful PHP integrated development environment