4,249
社区成员




+ public
| - .htaccess // Rewrite rules
| - index.php // Application entry
| + static
| + css
| + js
| + img
- application/
- Bootstrap.php // Bootstrap
+ configs
| - application.ini // Configure
+ controllers
- IndexController.php // Default controller
+ layouts
| + default
- layout.phtml // layout
+ logs //Log
+ models //Model
+ services //Service
+ views
| + scripts
|+ index
- index.phtml // View template for default controller
+ library
| + Star //Star Framework
<?php
return array(
"production" => array( //环境变量
"bootstrap" => array( //bootstrap设置
"path" => APPLICATION_PATH . "/Bootstrap.php", //bootstrap路径
),
"resources" => array(
"frontController" => array(
"debug" => true, //是否打开debug模式
),
),
),
);
?>
[production]
;bootstrap路径
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
;bootstrap类名
bootstrap.class = "Bootstrap"
# 设置文档根目录为 “sf_path/public”
DocumentRoot "sf_path/public"
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule !\.(js|css|png|jpg|jpeg|gif|swf|ico|html|htm)$ index.php [NC,L]
server {
listen 80;
server_name www.yoursf.com;
location / {
root sf_path/public;
index index.php;
if (!-e $request_filename) {
rewrite ^/(.*) /index.php/$1 last;
}
}
location ~* \.(js|css|png|jpg|jpeg|gif|swf|ico|html|htm)$ {
break;
}
location ~ \.php$ {
root sf_path/public;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}
http://www.yoursf.com/