Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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֪ʶ»ýÀÛ

1 ÔÚSQLÓï¾äÖпÉͨ¹ýÌí¼ÓÏÞÖÆÌõ¼þ:left(text,20)ֻȡtextÎı¾µÄÇ°20¸ö×Ö;
¡¡¡¡2 ¿ÉÒÔÓÃlimit fromRecord, RecordNum À´×÷Ϊ·ÖҳʹÓÃ,±ÈÈçlimit 0,30±íʾ´ÓµÚÒ»¸ö¼Ç¼¿ªÊ¼±éÀú30¸ö¼Í¼;
¡¡¡¡3 Á½¸ö±íµÄÁ¬½Ó¿ÉÒÔÊÇ£ºtable1 join table2 using x(xΪÁ½¸ö±íµÄ¹«¹²×Ö¶Î),»òÕßÊÇtable1 join table2 on table1.x = table2.x
¡¡¡ ......

ÎÒµÄphpÑéÖ¤ÂëÀà


<?php
/*
 * Created on 2010-3-11
 * author:zhangfei
 *ÎÒµÄÑéÖ¤ÂëÀà
 */
 session_start();
 class Check_Class{
  public $h_img ;
public $c_back ;
public $c_front ;
//¹¹Ô캯Êý
function Check_Class(){
$h_img  =  imagecreate(100,30);
......

php ħ·¨ÒýÓú¯Êý

PHPÌṩÁ½¸ö·½±ãÎÒÃÇÒýÓÃÊý¾ÝµÄħ·¨ÒýÓú¯Êýmagic_quotes_gpcºÍmagic_quotes_runtime£¬ÕâÁ½¸öº¯ÊýÈç¹ûÔÚphp.iniÉèÖÃΪONµÄʱºò£¬¾Í»áΪÎÒÃÇÒýÓõÄÊý¾ÝÅöµ½µ¥ÒýºÅ'ºÍË«ÒýºÅ"ÒÔ¼°·´Ð±Ïß \ ÊÇ×Ô¶¯¼ÓÉÏ·´Ð±Ïߣ¬°ïÎÒÃÇ×Ô¶¯×ªÒë·ûºÅ£¬È·±£Êý¾Ý²Ù×÷µÄÕýÈ·ÔËÐУ¬¿ÉÊÇÎÒÃÇÔÚphp²»Í¬µÄ°æ±¾»òÕß²»Í¬µÄ·þÎñÆ÷ÅäÖÃÏ£¬ÓеÄmagic_quotes_g ......

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

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