目录
Set Nginx
server { listen 80; server_name www.test.com/mysticbinary/ ; root "D:\ProgramFiles\phpstudy\PHPTutorial\WWW\A"; # the `/A` file must hava `index.php` location / { index index.php index.html index.htm; #nginx ignore index.php if (!-e $request_filename){ rewrite ^/(.*) /index.php last; } } location ~ \.php(.*)$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_split_path_info ^((?U).+\.php)(/?.+)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; include fastcgi_params; }}
Set index.php
# ...require_once(FRAMEWORK_PATH . '/yii.php');$config = $strDir . '/../config/yii_app_config.php';$app = Yii::createWebApplication($config);# ...
Set yii_app_config.php
Autoloading model and component classes.
# ... 'import' => array( 'application.components.*', 'ext.api.*', 'ext.phpconnectpool.*', 'ext.exception.*', 'ext.rongconfig.*', 'Youseleve.Redis.*', 'Xxx.Db.*',# ...
the Xxx
is the name you define.