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

PHP header() examples ÍêÕû´úÂë


/*** Function: PHP header() examples (PHP)
**
Desc: Some examples on how to use the header() function of PHPYou find
a detailed tutorial at expertsrt.com (English) or at ffm.junetz.de
(German).These is also a good help about caching at web-caching.com.
**
Example: see below.
<br/><br/><b>Tip:</b>
You can use these sites to check your headers: <a
href="http://web-sniffer.net/">web-sniffer.net</a>,
<a
href="http://www.delorie.com/web/headers.html">delorie.com</a>
or <a
href="http://www.forret.com/projects/analyze/">www.forret.com</a>.
** Author: Jonas John
*/
// fix 404 pages:
header('HTTP/1.1 200 OK');
// set 404 header:
header('HTTP/1.1 404 Not Found');
// set Moved Permanently header (good for redrictions)
// use with location header
header('HTTP/1.1 301 Moved Permanently');
// redirect to a new location:
header('Location: http://www.example.org/');
// redrict with delay:
header('Refresh: 10; url=http://www.example.org/');
print 'You will be redirected in 10 seconds';
// you could also use the HTML syntax:// <meta http-equiv="refresh" content="10;http://www.example.org/ />
// override X-Powered-By: PHP:
header('X-Powered-By: PHP/4.4.0');
header('X-Powered-By: Brain/0.6b');
// content language (en = English)
header('Content-language: en');
// last modified (good for caching)
$time = time() – 60; // or filemtime($fn), etc
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $time).' GMT');
// header for telling the browser that the content
// did not get changed
header('HTTP/1.1 304 Not Modified');
// set content length (good for caching):
header('Content-Length: 1234');
// Headers for an download:
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="example.zip"');


Ïà¹ØÎĵµ£º

ÔÚPHPÖÐÈ«Ãæ×èÖ¹SQL×¢Èëʽ¹¥»÷Ö®Ò»

Ò»¡¢ ÒýÑÔ
¡¡¡¡PHPÊÇÒ»ÖÖÁ¦Á¿Ç¿´óµ«Ï൱ÈÝÒ×ѧϰµÄ·þÎñÆ÷¶Ë½Å±¾ÓïÑÔ£¬¼´Ê¹ÊǾ­Ñé²»¶àµÄ³ÌÐòÔ±Ò²Äܹ»Ê¹ÓÃËüÀ´´´½¨¸´ÔӵĶ¯Ì¬µÄwebÕ¾µã¡£È»¶ø£¬ËüÔÚʵÏÖÒòÌØÍø·þÎñµÄÃØÃܺͰ²È«·½ÃæÈ´³£³£´æÔÚÐí¶àÀ§ÄÑ¡£ÔÚ±¾ÏµÁÐÎÄÕÂÖУ¬ÎÒÃǽ«Ïò¶ÁÕß½éÉܽøÐÐweb¿ª·¢Ëù±ØÐèµÄ°²È«±³¾°ÒÔ¼°PHPÌØ¶¨µÄ֪ʶºÍ´úÂë-Äã¿ÉÒÔ½èÒÔ±£»¤Äã×Ô¼ºµÄwebÓ¦Óó ......

PHPÏÂÔØCSSÎļþÖеÄͼƬ

×÷Ϊһ¸ö×ÊÉî²¢ÇÒרҵµÄ°ÇƤÈËÔ±£¬ÔÚÎÒ´Ó³õÈý¿ªÊ¼Í¶Èëΰ´óµÄ»¥ÁªÍøÖе½ÏÖÔÚ»ýÀÛÁ˷ḻµÄ°ÇƤ¾­Ñé¡£ÎÒÏàÐÅÿ¸ö×öwebµÄ³ÌÐòÔ±Ò²¶¼»áÓÐÀàËÆµÄ¾­Àú¡£
ÔÚ°ÇÆ¤¹ý³ÌÖУ¬±Ø²»¿ÉÉÙµÄÐèÒªÏÂÔØÑùʽÎļþÖеÄͼƬ¡£Åöµ½±È½ÏÅÓ´óµÄÑùʽÎļþ£¬ÆäÖпÉÄÜ»áÓÐÉϰٸöÐèÒªÏÂÔØµÄͼƬ£¬ÄÇôʹÓÃÏÂÃæÕâ¶ÎС´úÂëÊÇ×îΪºÏ
ÊʵÄÁË¡£
< ?php
/* ......

Á˽âÈçºÎʹÓà PHP µÄ¸÷ÖÖÎļþº¯Êý

·¢ÐÅÈË: feuvan ( }><(([@> ~ ), ÐÅÇø: PHP
±ê  Ìâ: [ÈëÃÅ]ÓàPHP ¶ÁÈ¡ÎļþµÄÕýÈ··½·¨
·¢ÐÅÕ¾: Ë®Ä¾ÉçÇø (Wed Mar  7 17:51:58 2007), Õ¾ÄÚ
http://www.ibm.com/developerworks/cn/opensource/os-php-re ......

XPÏÂApache php mysql phpmyAdminµÄ°²×°ÓëÅäÖÃ

³õѧphp,ÐèÒª´î½¨Æä¿ª·¢»·¾³¡£ÓÉÓÚ°æ±¾¸üÌæµÈÔ­Òò£¬ÍøÉϵķ½·¨¼¸ºõÒ»ÈËÒ»¸öÑù£¬ÈÃÈËÎÞËùÊÊ´Ó¡£×òÌ컨ÁËÒ»ÍíÉÏʱ¼ä²ÅÔÚXPÏÂÅäÖúã¬ÏÖ½«ÆäÕûÀí³öÀ´£¬Ï£ÍûÄܶԱðÈËÓÐÓᣣ¨2007-11-21£©
 
Ò»¡¢ ÏÂÔØÈí¼þ¡£
1. ÏÂÔØapache_2.0.55-win32-x86-no_ssl.msi£¬ÓÒ¼üÓÃѸÀ×µã»÷´Ë´¦ÏÂÔØ£¨Ö±½Óµã»÷²»ÐУ©¡£
2. ÏÂÔØphp-5 ......

¼¸ÖÖ³£ÓÃPHPÁ¬½ÓÊý¾Ý¿âµÄ´úÂë

PHPÁ¬½ÓÊý¾Ý¿âÖ®PHPÁ¬½ÓMYSQLÊý¾Ý¿â´úÂë < ?php   
$mysql_server_name='localhost'; 
//¸Ä³É×Ô¼ºµÄmysqlÊý¾Ý¿â·þÎñÆ÷  
$mysql_username='root'; 
//¸Ä³É×Ô¼ºµÄmysqlÊý¾Ý¿âÓû§Ãû  
$mysql_password='12345678'; 
//¸Ä³É×Ô¼ºµÄmysqlÊý¾Ý¿âÃÜÂë &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ