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

PHP³¬È«¾Ö±äÁ¿Ö®$_SERVERµÄÏêϸÓ÷¨

 $_SERVER['PHP_SELF'] #µ±Ç°ÕýÔÚÖ´Ðнű¾µÄÎļþÃû£¬Óë document rootÏà¹Ø¡£
$_SERVER['argv'] #´«µÝ¸ø¸Ã½Å±¾µÄ²ÎÊý¡£
$_SERVER['argc'] #°üº¬´«µÝ¸ø³ÌÐòµÄÃüÁîÐвÎÊýµÄ¸öÊý£¨Èç¹ûÔËÐÐÔÚÃüÁîÐÐģʽ£©¡£
$_SERVER['GATEWAY_INTERFACE'] #·þÎñÆ÷ʹÓÃµÄ CGI ¹æ·¶µÄ°æ±¾¡£ÀýÈ磬“CGI/1.1”¡£
$_SERVER['SERVER_NAME'] #µ±Ç°ÔËÐнű¾ËùÔÚ·þÎñÆ÷Ö÷»úµÄÃû³Æ¡£
$_SERVER['SERVER_SOFTWARE'] #·þÎñÆ÷±êʶµÄ×Ö´®£¬ÔÚÏìÓ¦ÇëÇóʱµÄÍ·²¿Öиø³ö¡£
$_SERVER['SERVER_PROTOCOL'] #ÇëÇóÒ³ÃæʱͨÐÅЭÒéµÄÃû³ÆºÍ°æ±¾¡£ÀýÈ磬“HTTP/1.0”¡£
$_SERVER['REQUEST_METHOD'] #·ÃÎÊÒ³ÃæʱµÄÇëÇó·½·¨¡£ÀýÈ磺“GET”¡¢“HEAD”£¬“POST”£¬“PUT”¡£
$_SERVER['QUERY_STRING'] #²éѯ(query)µÄ×Ö·û´®¡£
$_SERVER['DOCUMENT_ROOT'] #µ±Ç°ÔËÐнű¾ËùÔÚµÄÎĵµ¸ùĿ¼¡£ÔÚ·þÎñÆ÷ÅäÖÃÎļþÖж¨Òå¡£
$_SERVER['HTTP_ACCEPT'] #µ±Ç°ÇëÇóµÄ Accept: Í·²¿µÄÄÚÈÝ¡£
$_SERVER['HTTP_ACCEPT_CHARSET'] #µ±Ç°ÇëÇóµÄ Accept-Charset: Í·²¿µÄÄÚÈÝ¡£ÀýÈ磺“iso-8859-1,*,utf-8”¡£
$_SERVER['HTTP_ACCEPT_ENCODING'] #µ±Ç°ÇëÇóµÄ Accept-Encoding: Í·²¿µÄÄÚÈÝ¡£ÀýÈ磺“gzip”¡£
$_SERVER['HTTP_ACCEPT_LANGUAGE']#µ±Ç°ÇëÇóµÄ Accept-Language: Í·²¿µÄÄÚÈÝ¡£ÀýÈ磺“en”¡£
$_SERVER['HTTP_CONNECTION'] #µ±Ç°ÇëÇóµÄ Connection: Í·²¿µÄÄÚÈÝ¡£ÀýÈ磺“Keep-Alive”¡£
$_SERVER['HTTP_HOST'] #µ±Ç°ÇëÇóµÄ Host: Í·²¿µÄÄÚÈÝ¡£
$_SERVER['HTTP_REFERER'] #Á´½Óµ½µ±Ç°Ò³ÃæµÄÇ°Ò»Ò³ÃæµÄ URL µØÖ·¡£
$_SERVER['HTTP_USER_AGENT'] #µ±Ç°ÇëÇóµÄ User_Agent: Í·²¿µÄÄÚÈÝ¡£
$_SERVER['REMOTE_ADDR'] #ÕýÔÚä¯ÀÀµ±Ç°Ò³ÃæÓû§µÄ IP µØÖ·¡£
$_SERVER['REMOTE_HOST'] #ÕýÔÚä¯ÀÀµ±Ç°Ò³ÃæÓû§µÄÖ÷»úÃû¡£
$_SERVER['REMOTE_PORT'] #Óû§Á¬½Óµ½·þÎñÆ÷ʱËùʹÓõĶ˿ڡ£
$_SERVER['SCRIPT_FILENAME'] #µ±Ç°Ö´Ðнű¾µÄ¾ø¶Ô·¾¶Ãû¡£
$_SERVER['SERVER_ADMIN'] #¹ÜÀíÔ±ÐÅÏ¢
$_SERVER['SERVER_PORT'] #·þÎñÆ÷ËùʹÓõĶ˿Ú
$_SERVER['SERVER_SIGNATURE'] #°üº¬·þÎñÆ÷°æ±¾ºÍÐéÄâÖ÷»úÃûµÄ×Ö·û´®¡£
$_SERVER['PATH_TRANSLATED'] #µ±Ç°½Å±¾ËùÔÚÎļþϵͳ£¨²»ÊÇÎĵµ¸ùĿ¼£©µÄ»ù±¾Â·¾¶¡£
$_SERVER['SCRIPT_NAME'] #°üº¬µ±Ç°½Å±¾µÄ·¾¶¡£ÕâÔÚÒ³ÃæÐèÒªÖ¸Ïò×Ô¼ºÊ±·Ç³£ÓÐÓá


Ïà¹ØÎĵµ£º

phpÖÐecho()£¬print()£¬print_r()µÄÇø±ð

1.echo()ÊÇÒ»¸öphpÓï¾ä£¬ËùÒÔûÓзµ»ØÖµ£¬ÄÜ´òÓ¡¼òµ¥µÄÊý¾Ý¡£
2.print()ÊÇÒ»¸öº¯Êý£¬Óзµ»ØÖµ£¬ÄÜ´òÓ¡¼òµ¥µÄÊý¾Ý¡£
3.print_r()ÊÇÒ»¸öº¯Êý£¬ÄÜ´òÓ¡¸´ÔÓµÄ(mix)Êý¾Ý¡£
È磺
<?
$value = print 'hello word<br>';
echo "the value is $value<br>";
$arr = array('name'=>'wangking','qq'=>'12345 ......

PHPÍøÕ¾¿ª·¢·½°¸£¨¿ª·¢ÐÂÈ˱ضÁ£©

Ò»¡¢¿ª·¢³ÉÔ±
a)ÏîÄ¿Ö÷¹Ü
b)Ò³ÃæÃÀ¹¤
c)Ò³Ã濪·¢
d)·þÎñ¶Ë³ÌÐò¿ª·¢
e)ϵͳÓëÊý¾Ý¹ÜÀí
f)²âÊÔÓë°æ±¾¿ØÖÆ
¶þ¡¢ ÍøÕ¾×鿪·¢¼òÃ÷Á÷³Ì
Èý¡¢ ¿ª·¢¹¤¾ßÓë»·¾³
a)·þÎñÆ÷ÅäÖÃ
i. WEB·þÎñÆ÷£º FreeBSD6.1+Apache2.0+PHP5.0£¬SVN°æ±¾¿ØÖÆ·þÎñ(½ö²âÊÔ»ú)¡£
ii.Êý¾Ý¿â·þÎñÆ÷£º WIN2003 server+SQL server 2000+MySQL5.0£¬CLUS ......

PHP×Ö·û´®½Ì³Ì_trimº¯Êý

 
PHP trim() º¯Êý
¶¨ÒåºÍÓ÷¨
trim() º¯Êý´Ó×Ö·û´®µÄÁ½¶Ëɾ³ý¿Õ°××Ö·ûºÍÆäËûÔ¤¶¨Òå×Ö·û¡£
Óï·¨
trim(str,charlist)
 ²ÎÊý 1 strΪ´ý²Ù×÷µÄ×Ö·û´®£¬²ÎÊý 2 charlist ¿ÉÑ¡£¬Ö¸¶¨ÁËÏëҪȥ³ýµÄÌØÊâ·ûºÅ¡£
Èç¹ûµÚ¶þ¸ö²ÎÊýû¸øÖµ£¬Ô¤Éè»áÈ¥³ýÏÂÁÐÕâЩ×ÖÔª£º 
" " (ASCII 32&nbs ......

PHP Ϊʲôfunction


PHP Ϊʲôfunction ÔÚÉùÃ÷ʱûÓÐÉùÃ÷²ÎÊý,¶øµ÷ÓÃʱ¼ÓN¸ö²ÎÊýÈ´ÊÇÔÊÐíµÄ
2008-11-13 20:14:38    ÆäËû |  ÆÀÂÛ(7) |  ä¯ÀÀ(721)
ÈçÌâ
//ÉùÃ÷
function test(){};
$a = '';
$b = '';
$c = '';
//µ÷ÓÃ
test($a,$b,$c,1,2,3);
ÏàÐŲ»ÉÙÐֵܽãÃÃÒ²Ôø¾­Óöµ½Í¬ÑùµÄÎÊÌâ¡£
why?
¸Õ¿ªÊ¼ÎÒÒ²Í¦Ó ......

PHP·À×¢Èë·ÖÎö

ÔÚÏÖÔÚ¸÷ÖֺڿͺáÐеÄʱºò£¬ÈçºÎʵÏÖ×Ô¼ºphp´úÂ밲ȫ£¬±£Ö¤³ÌÐòºÍ·þÎñÆ÷µÄ°²È«ÊÇÒ»¸öºÜÖØÒªµÄÎÊÌ⣬ÎÒËæ±ã¿´ÁËϹØÓÚphp°²È«µÄ×ÊÁÏ£¬²¢²»ÊǺܶ࣬ÖÁÉÙ±ÈaspÉÙ¶àÁË£¬ºÇºÇ£¬ÓÚÊǾÍÏëдµã¶«Î÷£¬À´·ÀÖ¹ÕâЩ¿ÉÄܳöÏÖµÄÇé¿ö¡£ÕâÀïûÓÐÌ«ÉîµÄ¼¼Êõº¬Á¿£¬ÎÒÖ»ÊDZȽϼòµ¥µÄ̸ÁË̸¡£(ÒÔϲÙ×÷ÈçÎÞ¾ßÌå˵Ã÷£¬¶¼ÊÇ»ùÓÚPHP+MySQL+ApacheµÄ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ