The last few articles are about how to set up and configure yaf and yaf for linux servers. the last few articles are about how to set up and configure yaf and yaf for linux servers, this video describes how to configure and install the yaf framework in windows, because linux is rarely used as the development environment for personal development and testing in China.
(1) the configuration file of windows yaf is the same as that of linux.
Project configuration file. ini
[App]
Application. directory = APP_PATH "/app /"
Application. view. ext = "html"
Application. library = APP_PATH "app/library /"
Application. bootstrap = APP_PATH "Bootstrap. php"
Application. dispatcher. catchException = 1
After the configuration output, we also loaded a Com class globally. However, you can see the differences in the next video. we also introduce some differences between windows and Linux.
Class Com {
Static function Dump (){
$ Args = func_get_args (); // returns an array composed of function parameters.
If (count ($ args) <1 ){
Return;
}
Echo'
';
// Multiple parameters are output cyclically
Foreach ($ args as $ data ){
Switch ($ data ){
// Determine the type and output it cyclically based on different types
Case is_array ($ data ):
Print_r ($ data );
Echo'
';
Break;
Case is_string ($ data ):
Echo $ data .'
';
Break;
Default:
Var_dump ($ data );
}
}
Echo'
';
}
}