Nginx/PHP/path_infoÎÊÌâ,È¥µôindex.php
×÷ÓÃÊÇ°ÑÐÎÈ磺www.abc.com/index.php/blog/show µÄµØÖ·ÃÀ»¯³É www.abc.com/blog/show ,ʹÓÃ$_SERVER['PATH_INFO']½ÓÊÕ±äÁ¿¡£
server
{
listen 80;
server_name myweb;
index index.html index.htm index.php;
root /home/zhaowei/code;
if (!-f $request_filename) {
rewrite ^/m-php-framework/(.*)$ /m-php-framework/index.php/$1 last;
}
location ~ .*\.(php|php5)
{
#fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
set $path_info "";
set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+?\\.php)(/.+)$") {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME /home/zhaowei/code$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
}
log_format wwwlogs '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" $http_x_forwarded_for';
access_log /data1/logs/wwwlogs.log wwwlogs;
}
#nginx -s reload ÖØÆôNGINX
Ïà¹ØÎĵµ£º
×î½üÒ»ÄêÀ´Ò»Ö±ÔÚʹÓÃfedora£¬·¢ÏÖlinuxÕæÊÇÌ«ÊʺÏÎÒÁË£¬Ï²»¶Ð´³ÌÐò£¬×Ô¼ºÏ¹µ¹ÌÚ£¬°¦windowsÎóÎÒ´óºÃÄ껪……
ÓÃPHPдÁËÒ»¶Î³ÌÐòÓÃÓÚÌáÈ¡ÍøÒ³ÖеÄÊý¾Ý£¬ÏàÐÅËÑË÷ÒýÇæÒ²ÊDz¶àµÄÏë·¨£¬Ö»²»¹ýËûÃÇÊý¾Ý¶à£¬Ëã·¨ºÃЩ£¬ºÇºÇ
[php]
<?php
/*
*´ËÎļþµÄÄ¿±êÊÇ×Ô¶¯ËѼ¯´æ´¢8684ÉϵÄÉîÛÚÊй«½»Êý¾Ý
*
*ÓÉ ......
<?php
header("content-type:text/html; charset=UTF-8");
/*
* record kid words and insert into database
* user by sending email to publication kid words
*
*/
include 'POP3.php';
include 'email_class.php';
include 'Mail_mimeDecode.php';
//include 'include/compatible ......
1¡¢Ç°ÑÔ
·ÖÒ³ÏÔʾÊÇÒ»Öַdz£³£¼ûµÄä¯ÀÀºÍÏÔʾ´óÁ¿Êý¾ÝµÄ·½·¨£¬ÊôÓÚweb±à³ÌÖÐ×î³£´¦ÀíµÄʼþÖ®Ò»¡£¶ÔÓÚweb±à³ÌµÄÀÏÊÖÀ´Ëµ£¬±àдÕâÖÖ´úÂëʵÔÚÊǺͺôÎüÒ»Ñù×Ô
È»£¬µ«ÊǶÔÓÚ³õѧÕßÀ´Ëµ£¬³£³£¶ÔÕâ¸öÎÊÌâÃþ²»×ÅÍ·Ð÷£¬Òò´ËÌصØ׫д´ËÎĶÔÕâ¸öÎÊÌâ½øÐÐÏêϸµÄ½²½â£¬Á¦ÇóÈÿ´ÍêÕâƪÎÄÕµÄÅóÓÑÔÚ¿´ÍêÒÔº ......
ÎÒƽʱ×ÜÊÇϲ»¶ÓÃ$_REQUESTÕâ¸öÊý×飬²»ÊÇÒòΪ±ðµÄ£¬¼òµ¥£¬¶øÇÒÏëÓÃGETʱºò¾ÍÓÃGETÖ±½Ó²âÊÔ¼´¿É¡£»¹¿ÉÒÔ°ÑURL´ò³öÀ´£¬ºÜÊÇ·½±ã¡£´Ó¶øºÜÉÙÓÃ$_GETºÍ$_POST³¬È«¾Ö±äÁ¿¡£
²»¹ý£¬´Ó½ñÒÔºóÎһᾡÁ¿²»ÔÙʹÓÃ$_REQUESTÕâ¸öÊý×飬ÒòΪÒÔÇ°¶ÔÕâ¸öÊý×éÓÐЩһ֪°ë½â£¬ ......