Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÖØд²úÉúµÄ


Ïà¹ØÎĵµ£º

PHPÖ®¸¸£º¿ª·ÅºÍ»¥¶¯ÊÇÍøÕ¾³É¹¦µÄ»ù´¡


PHPÖ®¸¸Rasmus LerdorfÔÚ»¥ÁªÍø¼¼Êõ¾«Ó¢ÂÛ̳Éϱíʾ£¬¿ª·¢ºÍ»¥¶¯ÊÇÍøÕ¾³É¹¦µÄ»ù´¡¡£
¡¡¡¡RasmusÒÔÑÇÂíÑ·ºÍÑÅ»¢¾ÙÀý£¬“ÕâЩÍøÕ¾Èç¹ûûÓÐÓû§µÄ»°£¬×öµÃÔÙƯÁÁҲʲô¶¼²»ÊÇ”¡£RasmusÈÏΪ£¬ÍøÕ¾Ò»¿ªÊ¼Ó뱨ֽһÑù£¬½ö½öÊÇ“µ¥Ïò½»Á÷”ÌṩÐÅÏ¢£¬ÓÐÈËÀ´¿´¼´¿É¡£
¡¡¡¡“µ«ÊǶÔÏÖ´úµÄÍøÕ¾À´Ëµ£¬ÕâÒÑ ......

ʹÓÃphpize½¨Á¢phpÀ©Õ¹

½ñÌìÒª½²µÄÊÇlinuxÏÂphpÀ©Õ¹µÄÈëÃÅƪ
¡¡¡¡ÏÂÃæÎÒÀ´½²½²ÈçºÎ×÷Ò»¸öphpµÄÀ©Õ¹
¡¡¡¡Ê×ÏÈÒªÓÐÒ»¸ö´î½¨ºÃµÄphp»·¾³
¡¡¡¡ÎÒ°ÑphpµÄ°²×°ÔÚÁË/usr/local/phpµ±È»Ò²Í¨¹ý
¡¡¡¡phpµÄÒ»¸öÅäÖÃphp.iniµÄ·¾¶µ«ÊÇҪעÒâÁË
¡¡¡¡ÓÃÕâÖÖ·½·¨°²×°µÄphpÀ©Õ¹²»ÄÜʵÏÖ
¡¡¡¡ÎÒÃÇÔÚphp°²×°ÒÔºóµÄ/usr/local/php/binĿ¼
¡¡¡¡ÕÒµ½Õâ¸öÎļþphp ......

PHP±¸·ÝÊý¾Ý¿âÔ­ÀíºÍ·½·¨

php100ѧϰ
Ô´Â룺http://bbs.php100.com/read-htm-tid-11052.html
1¡¢PHP±¸·ÝÊý¾Ý¿âµÄÔ­Àí
2¡¢PHPÖÐmysqlÏà¹Øº¯Êý
mysql_list_tables() ±í²éѯº¯Êý£¬ÀàËÆmysql_query() º¯Êý
mysql_fetch_field() ×Ö¶ÎÐÅÏ¢º¯Êý£¬·µ»Ø¾ä±ú
Name ×ֶεÄÃû³Æ
Table ×Ö¶ÎËùÊôÊý¾Ý±íµÄÃû³Æ
Type ×ֶεÄÀàÐÍ
max_length ×ֶεÄ×î´ó³¤¶È ......

php×Ö·û´®º¯ÊýÓ¦Ó×—¾­µä

  PHP: echo substr("1234567", 1, 3);
ºÍ PHP: echo substr(123456,1, 3);
ÊÇÒ»ÑùµÄ
¶¨Òå
Ò»°ãÓÃË«ÒýºÅ»òµ¥ÒýºÅ±êʶһ¸ö×Ö·û´®¡£±ÈÈç PHP: $str = "i love u";
$str = 'i love u';
ËüÕßÁ½ÕßÊÇÓÐһЩÇø±ðµÄ¡£ºóÕß½«Ò»Çе¥ÒýºÅµÄÄÚÈݶ¼»áµ±×÷×Ö·û´¦Àí£»Ç°ÕßÔ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ