欧美日韩精品在线,国内精品久久久久久久久,一级毛片恃级毛片直播,清纯唯美亚洲综合欧美色

解析CI即CodeIgniter框架在Nginx下的重寫規(guī)則_PHP教程

編輯Tag賺U幣

推薦:深入php函數(shù)file_get_contents超時(shí)處理的方法詳解
本篇文章是對(duì)php函數(shù)file_get_contents超時(shí)處理的方法進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下

最近研究CI框架,發(fā)現(xiàn)這個(gè)框架的路由功能在Nginx下有問題,報(bào)404錯(cuò)誤,后來在網(wǎng)上查資料,
發(fā)現(xiàn)需要開啟PATH_INFO。在nginx7.16以后貌似就支持PATH_INFO了,只需要在配置文件中開啟即可。
打開nginx.conf文件,在你的虛擬主機(jī)下增加重寫規(guī)則,代碼如下:
復(fù)制代碼 代碼如下:m.dounai2.com

server {

listen 80;
server_name www.ci.com;
location / {
root d:/www/Codeigniter_2.0.1/;
index index.html index.htm index.php;
rewrite ^/$/index.php last;
rewrite^/(?!index\.php|robots\.txt|images|js|styles)(.*)$ /index.php/$1last;
}
location ~^(.+\.php)(.*)$ {
root D:/www/Codeigniter_2.0.1/;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.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;
fastcgi_pass 127.0.0.1:9002;
include fastcgi_params;
}
}

分享:詳解PHP內(nèi)置訪問資源的超時(shí)時(shí)間 time_out file_get_contents read_file
本篇文章是對(duì)PHP內(nèi)置訪問資源的超時(shí)時(shí)間time_out file_get_contents read_file進(jìn)行了詳細(xì)的分析介紹,需要的朋友參考下

來源:模板無憂//所屬分類:PHP教程/更新時(shí)間:2013-06-04
相關(guān)PHP教程