Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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


Ïà¹ØÎĵµ£º

MemcachedÖÐPerlÐòÁл¯´æ´¢µÄ¶ÔÏóPHPÎÞ·¨¶ÁÈ¡µÄ½â¾ö

Perl MemcachedµÄ¿Í»§¶ËÐòÁл¯¶ÔÏó²ÉÓõÄÊÇStorableÄ£¿éµÄnfreeze·½·¨£¬¶øÕâ¸ö·½·¨ÓÖµ÷ÓÃÁËcÀ©Õ¹µÄdo_store·½·¨£»·´ÐòÁл¯Ê¹ÓõÄÊÇStorableÄ£¿éµÄthaw·½·¨£¬¶øÕâ¸ö·½·¨ÓÖÊǵ÷ÓõÄcÀ©Õ¹µÄdo_retrieve·½·¨¡£
¶øÔÚPHPÖУ¬½øÐеÄÈ´ÊÇserializeºÍunserialize²Ù×÷¡£Ôì³ÉÁËÎÞ·¨Õý³£¶ÁÈ¡µÄ½á¹û¡£
Perl´æ´¢Ò»¸ö('a', 'c')Êý×éµÄÒýÓ ......

PHPÉú³ÉÊý¾ÝÁ÷GIFºÍPNG͸Ã÷ͼÐÎ


<?php
header("content-type:image/png");
$img=ImageCreate(100,35);
$bgcolor=ImageColorAllocate($img,0,0,0);
$red=ImageColorAllocate($img,255,0,0);
$bgcolortrans=ImageColorTransparent($img,$bgcolor);
ImageString($img,5,10,10,"PNG PHP",$red);
ImagePng($img);
ImageDestro ......

phpºóÍËÒ»Ò³±íµ¥ÄÚÈݵı£´æ


php±íµ¥ÔÚÌá½»Ö®ºóÔÙºóÍË,±íµ¥µÄÄÚÈÝĬÈÏÊDZ»Çå¿ÕµÄ(ʹÓÃsession_startµÄʱºò),
½â¾ö·½·¨ÊÇÔÚsession_start()Ö®ºó,×Ö·ûÊä³ö֮ǰдÉÏ
header(“Cache-control: private”);  
 
ÍøÒ³µÄ»º´æÊÇÓÉHTTPÏûϢͷÖеēCache-control”À´¿ØÖƵ쬳£¼ûµÄȡֵÓÐprivate¡¢no- cache¡¢max-age¡ ......

PHP»º´æÊµÏÖ


<?php  
class
 CacheException 
extends
 Exception {}  
/**
 
 * »º´æ³éÏóÀà
 
 */
  
abstract
 
class
 Cache_Abstract {  
    /**
 
   &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ