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

PHP header() examples

 //ÓÃÕâ¸öheaderÖ¸ÁîÀ´½â¾öURLÖØд²úÉúµÄ404 header     
header('HTTP/1.1 200 OK');     
   
// Ò³ÃæûÕÒµ½     
header('HTTP/1.1 404 Not Found');     
   
// ·ÃÎÊÊÜÏÞ     
header('HTTP/1.1 403 Forbidden');     
   
// The page moved permanently should be used for     
// all redrictions, because search engines know     
// what's going on and can easily update their urls.     
//Ò³Ãæ±»ÓÀ¾Ãɾ³ý£¬¿ÉÒÔ¸æËßËÑË÷ÒýÇæ¸üÐÂËüÃǵÄurls     
//PS:µÚÒ»´ÎÅöµ½Õâ¸öÖ¸Á²»ÖªµÀÄܲ»ÄÜÓÃÀ´°Ñ×Ô¼ºµÄÕ¾µã´ÓËÑË÷ÒýÇæÖÐɾ³ýÄØ£¿     
header('HTTP/1.1 301 Moved Permanently');    
// ·þÎñÆ÷´íÎó    
header('HTTP/1.1 500 Internal Server Error');    
// Öض¨Ïòµ½Ò»¸öеÄλÖà   
header('Location: http://www.example.org/');     
   
// ÑÓ³ÙÒ»¶Îʱ¼äºóÖض¨Ïò     
header('Refresh: 10; url=http://www.example.org/');     
print 'You will be redirected in 10 seconds';    
// Ò²¿ÉÒÔʹÓÃHTMLÓï·¨À´ÊµÏÖÑÓ³Ù    
// zip"');     
header('Content-Transfer-Encoding: binary');     
// ¼ÓÔØÒªÏÂÔصÄÎļþ:     
readfile('example.zip');     
   
// ½ûÖ¹»º´æµ±Ç°Îĵµ:&n


Ïà¹ØÎĵµ£º

ÅäÖÃphp×Ô´øµÄmail¹¦ÄÜ

       Ö®Ç°ÅªphpµÄʱºò£¬ÐèҪ¼ÖÆÆÁÄ»£¬¾ÍÊÇÓÃphp×Ô´øµÄemailº¯Êý·¢ÐÅ£¬ÒòΪûÓÐ×Ô¼ºÅª¹ýsmtpµÄ ·þÎñÆ÷£¬ÍøÉÏÌṩµÄsmtp·þÎñÆ÷¶¼ÊÇÐèҪʹÓÃÃÜÂëÈÏÖ¤ µÄ£¬Æ«Æ«phpÄÚÖõĺ¯Êý¾ÍûÓÐÌṩÉí·ÝÈÏÖ¤£¬Ò²¾Íµ¼ÖÂÁ˱ØÐëÐèÒªÔÚ×Ô¼ºµÄµçÄԴһ¸ö¿ÉÒÔ×ÔÖ÷·¢ÐŵÄmail·þÎñÆ÷£¡
    È»ºó ......

PHPÖйØÓÚutf

 Ò».HTMLÒ³ÃæתUTF-8±àÂëÎÊÌâ
1.ÔÚ<head>ºó£¬<title>Ç°¼ÓÈëÒ»ÐУº
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
˳Ðò²»ÄÜ´í£¬Ò»¶¨ÒªÔÚ<title>±êÇ©Ç°¼ÓÈ룬·ñÔòÈç¹û<title>Óë</title>Ö®¼äÓÐÖÐÎÄ×Ö·ûµÄ»°£¬
ÏÔʾµÄ±êÌâÓпÉÄÜÊÇÂÒÂ룡
2.htmlÎ ......

ʹPHP¼´Ê±Êä³ö½á¹ûµ½ä¯ÀÀÆ÷

PHP:
<?php
for
(
$i
=
0
;
$i
<
10
;
$i
++
)
{
    echo
$i
;
    sleep
(
1
)
;
}
?>
ÀàËÆÉÏÃæµÄ³ÌÐòÈç¹ûÔÚPHP½âÊÍÆ÷ÖÐÖ´ÐУ¬Ã¿Ãë»áÊä³öÒ»¸öÊý£¬ºÍÏëÏóÖÐÒ»Ñù¡£µ«ÊÇÈç¹ûʹÓÃä¯ÀÀÆ÷À´·ÃÎÊ£¬Çé¿ö¾ÍÓÐËù²»Í¬¡£ÔÚä¯ÀÀÆ÷ÖзÃÎÊʱ£¬Ö»ÓÐÔÚÊ®ÃëÖ®ºó²Å»áÒ»´ÎÐÔµØÏÔʾËù ......

PHP¶ÁÈ¡BMP¸ñʽͼƬµÄº¯Êý

PHPÖоÓȻûÓжÁÈ¡BMP¸ñʽͼƬµÄº¯Êý,»¹ºÃ¸ßÈËÒѾ­Ð´ºÃÒ»¸ö,ÎÒû¿´´úÂë,·´ÕýÄÜÕý³£Ê¹ÓÃ.
imagecreatefrombmp -- ´Ó BMP Îļþ»ò URL н¨Ò»Í¼Ïñ
function imagecreatefrombmp($file)
{
global $CurrentBit, $echoMode;
$f=fopen($file,"r");
$Header=fread($f,2);
if($Header=="BM" ......

WindowsÏ°²×°×îеÄApache+PHP+MySQLÖ¸ÄÏ

 ×¢Ò⣺֮ǰÎÒÔÚÍøÉÏÕÒÁ˺öàµÄ×ÊÁÏ NND¶¼²»ÄÜÕý³£ÅäÖóɹ¦ ¸ãµÃÎÒÊǷdz£µØÓôÃÆ£¡
ÕÒµ½ÕâƪÎÄÕÂÖ®ºóÎÒÖÕÓÚÅäÖóɹ¦ÁË£¡ÍÛºÃˬѽ£¡Ö»Òª°´ÕÕ ÉÏÃæµÄ²½Öè¾ÍÒ»¶¨Äܹ»³É¹¦µÄ£¡
´ËÎÄյݲװ·½·¨ÊÊÓÃÓÚWindows XPϵÄApache+PHP+MySQL°²×°£¬Í¬Ê±Ò²ÊÊÓÃÓÚWindows 2003ϵͳϵݲװºÍÅäÖá£
1. °²×°»·¾³
²Ù×÷ϵͳÊÇ Window ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ