yaf

(重定向自Yaf

yet another framework

安装

https://github.com/laruence/php-yaf
http://www.laruence.com/manual/yaf.install.html#yaf.installation.linux

为IDE添加支持

git clone https://github.com/elad-yosifon/php-yaf-doc.git

PhpStorm

Menu "File" -> "Settings" -> "PHP" -> Select path to folder "php-yaf-doc"

NetBeans

  • Right click your project -> "Properties"
  • Select the "PHP Include Path" category
  • Click "Add Folder..."
  • Select your checkout of php-yaf-doc
  • Click "Open"
  • Click "OK"

Zend Studio IDE (Eclipse PDT)

  • Open "Window" -> "Preferences"
  • In preferences dialog open "PHP" -> "PHP Libraries"
  • Click "New" button, in "User library name" enter "PHP-Yaf", click "OK"
  • Select newly created "PHP-Yaf", library Click "Add external folder", select path to the folder which contains your checkout of php-yaf-doc or you can download single "yaf.php" file https://raw.github.com/elad-yosifon/php-yaf-doc/master/yaf.php
  • Include your custom library in your project: open "Project" -> "Properties" -> "PHP Include Path", click add library, select "User library", click "Next", check "PHP-Yaf", click "Finish"

Nginx配置

server
{
      listen       80;
      server_name demo.yafphp.com;
      index index.html index.htm index.php;
      root  /home/wwwroot/demo.yafphp.com/public;
      error_log /data/order8.log;

      location ~ \.php$
      {
              fastcgi_pass  unix:/tmp/php-cgi.sock;
              fastcgi_index index.php;
              include fcgi.conf;

              include fastcgi_params;
              fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
      }

     if (!-e $request_filename) {
             rewrite ^/(.*\.(js|ico|gif|jpg|png|css|bmp|html|xls)$) /public/$1 last;
             rewrite ^/(.*) /index.php?$1 last;
     }

}

参考资料