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

php±àÂëheaderÖвÎÊý˵Ã÷

ÍøÒ³µÄ»º´æÊÇÓÉHTTPÏûϢͷÖеġ°Cache-control¡±À´¿ØÖƵģ¬³£¼ûµÄÈ¡ÖµÓÐprivate¡¢no-cache¡¢max-age¡¢must-revalidateµÈ£¬Ä¬ÈÏΪprivate¡£Æä×÷Óøù¾Ý²»Í¬µÄÖØÐÂä¯ÀÀ·½Ê½·ÖΪÒÔϼ¸ÖÖÇé¿ö£º £¨1£© ´ò¿ªÐ´°¿Ú
ֵΪprivate¡¢no-cache¡¢must-revalidate£¬ÄÇô´ò¿ªÐ´°¿Ú·ÃÎÊʱ¶¼»áÖØзÃÎÊ·þÎñÆ÷¡£
¶øÈç¹ûÖ¸¶¨ÁËmax-ageÖµ£¬ÄÇôÔÚ´ËÖµÄÚµÄʱ¼äÀï¾Í²»»áÖØзÃÎÊ·þÎñÆ÷£¬ÀýÈ磺
Cache-control: max-age=5(±íʾµ±·ÃÎÊ´ËÍøÒ³ºóµÄ5ÃëÄÚÔٴηÃÎʲ»»áÈ¥·þÎñÆ÷) £¨2£© ÔÚµØÖ·À¸»Ø³µ
ֵΪprivate»òmust-revalidateÔòÖ»ÓеÚÒ»´Î·ÃÎÊʱ»á·ÃÎÊ·þÎñÆ÷£¬ÒÔºó¾Í²»ÔÙ·ÃÎÊ¡£
ֵΪno-cache£¬ÄÇôÿ´Î¶¼»á·ÃÎÊ¡£
ֵΪmax-age£¬ÔòÔÚ¹ýÆÚ֮ǰ²»»áÖظ´·ÃÎÊ¡£ £¨3£© °´ºóÍË°´Å¤
ֵΪprivate¡¢must-revalidate¡¢max-age£¬Ôò²»»áÖØ·ÃÎÊ£¬
ֵΪno-cache£¬Ôòÿ´Î¶¼Öظ´·ÃÎÊ £¨4£© °´Ë¢Ð°´Å¤
ÎÞÂÛΪºÎÖµ£¬¶¼»áÖظ´·ÃÎÊ Cache-controlֵΪ¡°no-cache¡±Ê±£¬·ÃÎÊ´ËÒ³Ãæ²»»áÔÚInternetÁÙʱÎÄÕ¼ÐÁôÏÂÒ³Ã汸·Ý¡£ ÁíÍ⣬ͨ¹ýÖ¸¶¨¡°Expires¡±ÖµÒ²»áÓ°Ïìµ½»º´æ¡£ÀýÈ磬ָ¶¨ExpiresֵΪһ¸öÔçÒѹýÈ¥µÄʱ¼ä£¬ÄÇô·ÃÎÊ´ËÍøʱÈôÖظ´ÔÚµØÖ·À¸°´»Ø³µ£¬ÄÇôÿ´Î¶¼»áÖظ´·ÃÎÊ£º Expires: Fri, 31 Dec 1999 16:00:00 GMT ±ÈÈ磺½ûÖ¹Ò³ÃæÔÚIEÖлº´æ httpÏìÓ¦ÏûϢͷ²¿ÉèÖ㺠CacheControl = no-cache
Pragma=no-cache
Expires = -1 ExpiresÊǸöºÃ¶«¶«£¬Èç¹û·þÎñÆ÷ÉϵÄÍøÒ³¾­³£±ä»¯£¬¾Í°ÑËüÉèÖÃΪ-1£¬±íʾÁ¢¼´¹ýÆÚ¡£Èç¹ûÒ»¸öÍøҳÿÌìÁ賿1µã¸üУ¬¿ÉÒÔ°ÑExpiresÉèÖÃΪµÚ¶þÌìµÄÁ賿1µã¡£ µ±HTTP1.1·þÎñÆ÷Ö¸¶¨CacheControl = no-cacheʱ£¬ä¯ÀÀÆ÷¾Í²»»á»º´æ¸ÃÍøÒ³¡£ ¾Éʽ HTTP 1.0 ·þÎñÆ÷²»ÄÜʹÓà Cache-Control ±êÌâ¡£
ËùÒÔΪÁËÏòºó¼æÈÝ HTTP 1.0 ·þÎñÆ÷£¬IEʹÓÃPragma:no-cache ±êÌâ¶Ô HTTP ÌṩÌØÊâÖ§³Ö¡£
Èç¹û¿Í»§¶Ëͨ¹ý°²È«Á¬½Ó (https://)Óë·þÎñÆ÷ͨѶ£¬ÇÒ·þÎñÆ÷ÔÚÏìÓ¦Öзµ»Ø Pragma:no-cache ±êÌ⣬
Ôò Internet Explorer²»»á»º´æ´ËÏìÓ¦¡£×¢Ò⣺Pragma:no-cache ½öµ±ÔÚ°²È«Á¬½ÓÖÐʹÓÃʱ²Å·ÀÖ¹»º´æ£¬Èç¹ûÔÚ·Ç°²È«Ò³ÖÐʹÓ㬴¦Àí·½Ê½Óë Expires:-1Ïàͬ£¬¸ÃÒ³½«±»»º´æ£¬µ«±»±ê¼ÇΪÁ¢¼´¹ýÆÚ header³£ÓÃÖ¸Áî
header·ÖΪÈý²¿·Ö£º
µÚÒ»²¿·ÖΪHTTPЭÒéµÄ°æ±¾(HTTP-Version)£»
µÚ¶þ²¿·ÖΪ״̬´úÂë(Status)£»
µÚÈý²¿·ÖΪԭÒò¶ÌÓï(Reason-Phrase)¡£ // fix 404 pages: ÓÃÕâ¸öheaderÖ¸ÁîÀ´½â¾öURLÖØд²úÉúµÄ


Ïà¹ØÎĵµ£º

dz̸php²å¼þÀ©Õ¹

 ×î½üÍ»·¢ÆæÏ룬.net¶¼ÓÐÃüÃû¿Õ¼ä»úÖÆ£º
       using System.data;.......,
  ÎÒÃÇÔÚ¿ª·¢phpʱ£¬ÊÇ·ñÒ²ÄÜʵÏÖÕâÖÖ»úÖÆÄØ£¬ÎÒÃÇÖªµÀÏÖÔÚµÄphp v5.2.9»¹²»Ö§³ÖÃüÃû¿Õ¼äµÄ¸ÅÄ
  µ«Ïà¹Øphp v5.3µÄ ×ÊÁϱíÃ÷ ÒѾ­Ê¹ÓÃÃüÃû¿Õ¼äµÄ¸ÅÄî £º
    &nb ......

php ѧϰ

<?php
    $txt = 'Hello world';
    echo $txt;
?>
<br/>
×Ö·û´®Á¬½Ó(.)
<br/>
echo 'Hello world'. "" . '1234'  Êä³ö£º 
<?php
    $txt1 = 'Hello world';
    $txt2 = '1234';
    ......

ÔÚÉú²ú»·¾³ÖÐʹÓÃphpÐÔÄܲâÊÔ¹¤¾ßxhprof

xhprofÊÇfacebook¿ªÔ´³öÀ´µÄÒ»¸öphpÐÔÄܲâÊÔ¹¤¾ß£¬Ò²¿ÉÒÔ³Æ֮Ϊprofile¹¤¾ß£¬Õâ¸ö´Ê²»ÖªµÀÔõô·­Òë²Å±È½Ï´ïÒâ¡£¸ú֮ǰһֱʹÓõÄxdebugÏà±È£¬ÓкܶàÀàËÆÖ®´¦¡£ÒÔÇ°¶ÔxdebugÓÐһЩ¼Ç¼»¹¿ÉÒÔ¹©²Î¿¼£¬µ«ÊÇËüµÄȱµãÊǶÔÐÔÄÜÓ°ÏìÌ«´ó£¬¼´±ãÊÇ¿ªÆôÁËprofiler_enable_trigger²ÎÊý£¬ÓÃÔÚÉú²ú»·¾³ÖÐÒ²ÊDzҲ»È̶ã¬cpuÁ¢¿Ì¾Íì­µ½high ......

php preg_split ÓÃÕýÔò±í´ïʽ·Ö¸î×Ö·û´®

˵Ã÷ array preg_split ( string $pattern, string $subject [, int $limit [, int $flags]] ) ·µ»ØÒ»¸öÊý×飬°üº¬ subject ÖÐÑØ×ÅÓë pattern Æ¥ÅäµÄ±ß½çËù·Ö¸îµÄ×Ó´®¡£ Èç¹ûÖ¸¶¨ÁË limit£¬Ôò×î¶à·µ»Ø limit ¸ö×Ó´®£¬Èç¹û limit ÊÇ -1£¬ÔòÒâζ×ÅûÓÐÏÞÖÆ£¬¿ÉÒÔÓÃÀ´¼ÌÐøÖ¸¶¨¿ÉÑ¡²ÎÊý flags¡£ flags ¿ÉÒÔÊÇÏÂÁбê¼ÇµÄÈÎÒâ× ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ