YAF Chinese Document: http://www.laruence.com/manual/index.html
1 YAF Framework is a extensible framework developed by C, which belongs to PHP;
2 Yaf performance compared to Yu Yuanseng PHP, performance only reduced by less than 10%;
The following straight into the topic, how to expand Yaf under Windows and generate YAF framework files (Linux will not repeat, there are many resources to explain)
Native environment
PHP5.6.24
Apache 2.0 Handler
YAF Framework Configuration
To use YAF first to open the PHP yaf extension, because the integration environment does not come with it so we have to download it ourselves;
YAF extension: Https://pecl.php.net/package/yaf
Such as:
The version selection has several important points, otherwise the extension is unsuccessful:
1 Select version to choose the version that matches your PHP version, I choose 2.3.5 Match PHP5.6;
2 Choose NTS or TS version, as well as X86 or X64, have decided:
So I chose TS, x86 version, like
3 when the download is complete, the compressed package is opened, and only one of the files we use is php_yaf.dll to unzip the file into the current PHP ext directory.
Edit php.ini Join Yaf.dll and configure the corresponding information
Add one line: Extension=php_yaf.dll
After completing the above configuration, restart Apache, you can see the configuration of Yaf in Phpinfo, such as:
Well, here's the end of the yaf extension.
But the framework has not been generated and how to generate it, see below
Generate YAF Framework Files
YAF project file Address: HTTPS://GITHUB.COM/LARUENCE/YAF/TREE/PHP5
Download it directly with Git clone https://github.com/laruence/yaf/tree/php5
The file structure is as follows
Then switch to the TOOLS/CG directory under CMD and use the PHP YAF_CG sample command
Sample is the project name and can be customized
PS: Want to directly use PHP YAF_CG sample condition is to add the PHP engine to the Windows environment variables, the specific method of the mother
After output Dono we can see the output folder in the directory, we copy it to the server directory
Then run http://localhost/sample/if the Hello world! is displayed I am Stranger congratulations on your success.
Expand Yaf under Windows, and generate YAF framework files