I am doing this video tutorial today, and then I will write a document. after a file is made, I will use centos. first, I will install the file, because I applied for a Tianyi Cloud host, for fast development and learning, I installed lamp in yum to explain how to install yaf in centos!
I am doing this video tutorial today, and then I will write a document. after a file is made, I will use centos. first, I will install the file, because I applied for a Tianyi Cloud host, for fast development and learning, I installed lamp in yum to explain how to install yaf in centos!
(1) install php-devel and pcre
Yum install php-devel pcre-y // Get the latest yaf wget http://pecl.php.net/get/yaf-2.2.9.tgz//decompress yaftar zxf *. tgzcd yaf */usr/bin/phpize. /configure -- with-php-config =/usr/bin/php-configmake & make install
(2) configuration
// Configure the INI file vim/etc/php. d/yaf. iniextension = yaf. so [yaf] # the default option name can modify the range update record # yaf. environ product PHP_INI_ALL environment name. when INI is used as the Yaf configuration file, this indicates the name of the section Yaf will read in the INI configuration # yaf. library NULL PHP_INI_ALL directory path of the global class library # yaf. cache_config 0 PHP_INI_SYSTEM indicates whether to cache the configuration file (effective only for the INI configuration file). enabling this option can improve the performance in case of complicated configuration # yaf. name_suffix 1 PHP_INI_ALL: when processing Controller, Action, Plugin, and Model, whether the key information in the class name is post #, such as UserModel, while in prefix mode, it is ModelUser # yaf. name_separator "" PHP_INI_ALL indicates the delimiter between the prefix and name when processing Controller, Action, Plugin, and Model. it is null by default, that is, UserPlugin, and is set "_", the judgment is based on "User_Plugin" to be compatible with the existing ST Naming conventions # yaf. forward_limit 5 PHP_INI_ALL forward maximum nested depth # yaf. when use_namespace 0 PHP_INI_SYSTEM is enabled, Yaf registers its own class using the namespace method. for example, Yaf_Application will become Yaf \ Application # yaf. when use_spl_autoload 0 PHP_INI_ALL is enabled, Yaf will continue to enable PHP to automatically load functions when loading fails. in terms of performance, this option should be disabled unless otherwise specified.
Hello word.
My created directory
app controller modules models plugins library viewsconf app.iniindex.php
Start writing hello word
'Index. php'
Run ();
App. ini
[Product]; supports writing the defined constant application. directory = APP_PATH "/application/" app/controller/Index. PHP in php.
GetView ()-> assign ("content", "Hello World") ;}}?> App/views/index. phtml Hello World