Next, in the previous article "Yaf basic learning summary 1-Yaf framework Introduction", we have a rough understanding of the Yaf framework, but for programmers, the text is superficial, what they want most is to start coding. Next, in the previous article "Yaf basic learning summary 1-Yaf framework Introduction", we have a rough understanding of the Yaf framework, but for programmers, all the text is superficial. what they want most is to start coding. Of course, this is also the most effective way to learn the Yaf framework. the more you think, the faster you will learn. The same is true for any language. we have to install the Yaf framework before writing code.
Compared with other PHP frameworks, Yaf is released as an extension of PHP. we also know that Yaf is implemented based on C language, and we cannot see its PHP code, of course, people with a C language background can look at his C source code. Anyone who knows how to install PHP extensions can skip this article, because Yaf is a PHP extension installation.
The following describes the yaf installation process (note: install yaf in Linux)
First of all, the first step to download the installation package to Ah, the official website is the http://pecl.php.net/package/yaf can select the latest version download, download the package after decompression, and enter the yaf installation package directory, execute the following commands in sequence ($ PHP_BIN is the bin directory of PHP installed on Linux)
$PHP_BIN/phpize ./configure --with-php-config=$PHP_BIN/php-config make make install
Step 2: modify the PHP configuration file, add the yaf. so extension, and restart PHP.
In this simple way, Yaf extensions have been installed. In fact, there is a simpler method. because Yaf is a PECL extension, you can directly enter the following command for one-click installation.
$PHP_BIN/pecl install yaf
All right, Yaf installation requires everyone to have a certain understanding of Linux. maybe some people running PHP on windows may ask how to install Yaf extension on Windows. this is really hard for me, what laruence says:
PHP5.3 does not support VC6 compilation at the beginning. Currently, php_yaf.dll can only be used in PHP5.3 or later versions. if necessary, contact Laruence