phpÖÐheaderº¯ÊýµÄʹÓÃ
header("HTTP/1.0 400 Bad Request");¡¡·µ»Ø400´íÎó
header("HTTP/1.0 404 Not Found"); ·µ»Ø404´íÎó
header("Location:http://$host$uri/$extra"); Ìø×ª
//ÉèÖÃnocache¡¡£¬¹ýÆÚ
header
(
"Cache-Control: no-cache,
must-revalidate"
);
//
HTTP/1.1
header
(
"Expires: Mon, 26 Jul 1997 05:00:00 GMT"
);
// Date in the past
?>
?>
header,php
1¡£PHP header() º¯Êý
ÍøÉϺܶà×ÊÁÏÕâÑùд£ºphpµÄº¯Êýheader()¿ÉÒÔÏòä¯ÀÀÆ÷·¢ËÍStatus±êÍ·£¬Èç¡¡header("Status: 404 Not Found")¡£
µ«ÊÇÎÒ·¢ÏÖʵ¼ÊÉÏä¯ÀÀÆ÷·µ»ØµÄÏìӦȴÊÇ£º
HTTP/1.x 200 OK
Date: Thu, 03 Aug 2006 07:49:11 GMT
Server: Apache/2.0.55 (Win32) PHP/5.0.5
X-Powered-By: PHP/5.0.5
Status:
404 Not Found
Content-Length: 0
Keep-Alive: timeout=15, max=98
Connection: Keep-Alive
Content-Type: text/html
²éÁËһЩ×ÊÁÏ£¬ÕýÈ·µÄд·¨ÊÇ£º
header("http/1.1
404 Not Found");
µÚÒ»²¿·ÖΪHTTPÐÒéµÄ°æ±¾(HTTP-Version)£»µÚ¶þ²¿·ÖΪ״̬´úÂë(Status)£»µÚÈý²¿·ÖΪÔÒò¶ÌÓï(Reason-Phrase)¡£ÈôÒªÏëÈÃä¯ÀÀÆ÷²»ÊÇ´Ó Proxy »ò cache ÖÐÈ¡µÃÒ³Ãæ£¬¿ÉÒÔʹÓÃÏÂÁеıêÍ·
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
¾ßÌ庬ÒåÏÂÃæ½âÊÍ¡£
2¡£½ûÖ¹Ò³ÃæÔÚIEÖлº´æ
httpÏìÓ¦ÏûϢͷ²¿ÉèÖãº
CacheControl = no-cache
Pragma=no-cache
Expires = -1
[color=#000000]ExpiresÊǸöºÃ¶«¶«£¬Èç¹û·þÎñÆ÷ÉϵÄÍøÒ³¾³£±ä»¯£¬¾Í°ÑËüÉèÖÃΪ-1£¬±íʾÁ¢¼´¹ýÆÚ¡£Èç¹ûÒ»¸öÍøÒ³Ã¿ÌìÁ賿1µã¸üУ¬¿ÉÒÔ°Ñ
[/color][color=#000000]Expires
[/color][color=#000000]ÉèÖÃΪµÚ¶þÌìµÄÁ賿1µã¡£
µ±HTTP1.1·þÎñÆ÷Ö¸¶¨
[/color]CacheControl = no-cache[color=#000000]ʱ£¬ä¯ÀÀÆ÷¾Í²»»á»º´æ¸ÃÍøÒ³¡£
[/color]¾Éʽ HTTP 1.0 ·þÎñÆ÷²»ÄÜʹÓà Cache-Control ±êÌâ¡£ËùÒÔΪÁËÏòºó¼æÈÝ HTTP 1.0 ·þÎñÆ÷£¬IEʹÓÃPragma:no-cache
±êÌâ¶Ô HTTP Ìṩ
Ïà¹ØÎĵµ£º
AddSlashes: ×Ö·û´®¼ÓÈëбÏß¡£
bin2hex: ¶þ½øÎ»×ª³ÉÊ®Áù½øÎ»¡£
Chop: È¥³ýÁ¬Ðø¿Õ°×¡£
Chr: ·µ»ØÐòÊýÖµµÄ×Ö·û¡£
chunk_split: ½«×Ö·û´®·Ö³ÉС¶Î¡£
convert_cyr_string: ת»»¹Å˹À·ò×Ö·û´®³ÉÆäËü×Ö·û´®¡£
crypt: ½«×Ö·û´®Óà DES ±àÂë¼ÓÃÜ¡£
echo: Êä³ö×Ö·û´®¡£
explode: Çпª×Ö·û´®¡£
flush: Çå³öÊä³ö»º³åÇø¡£
get ......
$username = "root";
$password = "123";
// ½¨Á¢Á¬½Ó
mysql_connect('localhost', $username, $p ......
< ?php
require("mail/class.phpmailer.php");//µ÷ÓÃ
$mail = new PHPMailer();//ʵÀý»¯phpmailer
$address = "mailxi@126.com";//½ÓÊÕÓʼþµÄÓÊÏä
$mail->IsSMTP(); // ÉèÖ÷¢ËÍÓʼþµÄÐÒ飺SMTP
......
1¡¢AddcSlashes ×Ö·û´®¼ÓÈ뷴бÏß
Óï·¨£ºstring addcslashes(string str,string charlist);
2¡¢AddSlashes ×Ö·û´®¼ÓÈ뷴бÏß
Óï·¨£ºstring addslashes(string str);
ÔÚÌØ¶¨µÄ×Ö·ûǰ¼Ó·´Ð±Ïߣº'¡¢"¡¢\¡¢NULL
3¡¢bin2hex ½«¶þ½øÎ»×ª³ÉÊ®Áù½øÎ»
Óï·¨£ºstring bin2hex(string str);
4¡¢Chop È¥³ýÁ¬Ðø¿Õ°×,ͬrtrim()
Óï· ......
- -! Õæ²»ÈÝÒ×°¡£¬ÅªÁËÒ»Ì죬ÖÕÓڸ㶨ÁË£¡
ÔÚubuntu9.04ϰ²×°£¬Ê×ÏÈҪ׼±¸µÄ¶«Î÷ºÜ¶à£¬´ó²¿·ÖÊÇÓÃÀ´Ö§³ÖphpµÄ¿â£¬·Ï»°²»¶à˵£¬Ð´Õâ¸öÒ²ÊÇΪÁ˱ãÓÚÎÒÒÔºó²é¿´Ó㬼ÇÒä²»ÐУ¬¿È¡£¡£ÓÐÐèÒªµÄÅóÓÑÒ²¿ÉÒÔÀ´È¥Óá£
ÔÚubuntuÉϰ²×°£¬ÓÐÒ»¸öºÃ´¦¾ÍÊÇÓÐÐÂÁ¢µÃÕâ¸öÈí¼þ£¬Ê×ÏÈÏȰ²×°mysql£¬ ......