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

ʲôÊÇPHP?

Ò»¡¢Ê²Ã´ÊÇPHP£¿PHPµÄ¸ÅÄîºÍ¼ò½é
¡¡¡¡PHPÊÇÒ»ÖÖÒ×ÓÚѧϰºÍʹÓõķþÎñÆ÷
¶Ë½Å±¾ÓïÑÔ¡£Ö»ÐèÒªºÜÉٵıà³Ì֪ʶÄã¾ÍÄÜʹÓÃPHP½¨Á¢Ò»¸öÕæÕý½»»¥µÄWEBÕ¾µã¡£±¾½Ì³Ì
²¢²»ÏëÈÃÄãÍêÈ«Á˽âÕâÖÖÓïÑÔ£¬Ö»ÊÇÄÜʹÄ㾡¿ì¼ÓÈ뿪·¢¶¯Ì¬webÕ¾µãµÄÐÐÁС£ÎÒ¼Ù¶¨ÄãÓÐһЩHTML£¨»òÕßHTML±à¼­Æ÷£©µÄ»ù±¾ÖªÊ¶ºÍһЩ±à³Ì˼Ïë¡£
¡¡¡¡1.¼ò½é
¡¡¡¡PHPÊÇÄÜÈÃÄãÉú³É¶¯Ì¬ÍøÒ³µÄ¹¤¾ßÖ®Ò»¡£PHP´ú±í£º³¬Îı¾Ô¤´¦ÀíÆ÷£¨PHP: Hypertext Preprocessor£©¡£PHPÊÇÍêÈ«Ãâ·ÑµÄ£¬²»Óû¨Ç®£¬Äã¿ÉÒÔ´ÓPHP¹Ù·½Õ¾µã(http://www.php
.net)
×ÔÓÉÏÂÔØ¡£PHP×ñÊØGNU¹«¹²Ðí¿É£¨GPL)£¬ÔÚÕâÒ»Ðí¿Éϵ®ÉúÁËÐí¶àÁ÷ÐеÄÈí¼þÖîÈçLinuxºÍEmacs¡£Äã¿ÉÒÔ²»ÊÜÏÞÖƵĻñµÃÔ´Â룬ÉõÖÁ¿ÉÒÔ´ÓÖÐ
¼Ó½øÄã×Ô¼ºÐèÒªµÄÌØÉ«¡£PHPÔÚ´ó¶àÊýUnixƽ̨£¬GUN/LinuxºÍ΢ÈíWindowsƽ̨ÉϾù¿ÉÒÔÔËÐС£ÔõÑùÔÚWindows»·¾³µÄPC»úÆ÷»ò
Unix»úÆ÷ÉÏ°²×°PHPµÄ×ÊÁÏ¿ÉÒÔÔÚPHP¹Ù·½Õ¾µãÉÏÕÒµ½£¬Ò²¿ÉÒÔ²éÔÄÍøÒ³ÌհɵēPHP°²×°È«¹¥±¸”רÌâÎÄÕ¡£°²×°¹ý³ÌºÜ¼òµ¥¡£
¡¡¡¡Èç¹ûÄãµÄ»úÆ÷½â¾öÁË2000ÎÊÌ⣬ÄÇôPHPÒ²Ò»ÑùûÓÐǧÄê³æÎÊÌ⣡Íø
¡¡¡¡PHPµÄÓ¦ÓÃÔÚ¸öÈËÐÔÖʵÄweb¹¤³ÌÖÐÔö³¤ÏÔÖø¡£¸ù¾ÝNetcraftÔÚ1999Äê10Ôµı¨¸æ£¬ÓÐ931122¸öÓòºÍ321128¸öIPµØÖ·ÀûÓÃPHP¼¼Êõ¡£
¡¡¡¡1.2 PHPµÄÏȽøÖ®´¦
¡¡¡¡Ó¦ÓÃPHPÓÐÐí¶àºÃ´¦¡£µ±È»ÒÑÖªµÄ²»ÀûÖ®´¦ÔÚÓÚPHPÓÉÓÚÊÇ¿ª·ÅÔ´ÂëÏîÄ¿£¬Ã»ÓÐʲôÉÌÒµÖ§³Ö£¬²¢ÇÒÓɴ˶ø´øÀ´µÄÖ´ÐÐËٶȻºÂý£¨Ö±µ½PHP4Ö®
Ç°£©¡£µ«ÊÇPHPµÄÓʼþÁбíºÜÊÇÓÐÓöøÇÒ³ý·ÇÄãÕýÔÚÔËÐÐÏñYahoo!»òÕßAmazon.comÕâÑùµÄ¼«ÊÜ»¶Ó­µÄÕ¾µã£¬Äã²»»á¸Ð¾õ³öPHPµÄËÙ¶ÈÓëÆäËûµÄ
ÓÐʲô²»Í¬¡£×îÆðÂëÎÒ¾ÍûÓиоõ³öÀ´£¡ºÃÁË£¬ÈÃÎÒÃÇÀ´¿´¿´PHPÓÐÄÇЩÓŵ㣺
¡¡¡¡- ѧϰ¹ý³Ì
¡¡¡¡ÎÒ¸öÈ˸üϲ»¶PHPµÄ·Ç³£¼òµ¥µÄѧϰ¹ý³Ì¡£ÓëJavaºÍPerl²»Í¬,Äã²»±Ø°ÑÍ·Âñ½ø100¶àÒ³µÄÎĵµÖÐŬÁ¦Ñ§Ï°²Å¿ÉÒÔд³öÒ»¸öÏóÑùµÄ³ÌÐò¡£Ö»
ÒªÁ˽âһЩ»ù±¾µÄÓï·¨ºÍÓïÑÔÌØÉ«£¬Äã¾Í¿ÉÒÔ¿ªÊ¼ÄãµÄPHP±àÂëÖ®ÂÃÁË¡£Ö®ºóÄãÔÚ±àÂë¹ý³ÌÖÐÈç¹ûÓöµ½ÁËʲôÂé·³£¬»¹¿ÉÒÔÔÙÈ¥·­ÔÄÏà¹ØÎĵµ¡£
¡¡¡¡PHPµÄÓï·¨ÀàËÆÓÚC£¬Perl£¬ASP»òÕßJSP¡£¶ÔÓÚÄÇЩ¶ÔÉÏÊöÖ®Ò»µÄÓïÑÔ½ÏÊìϤµÄÈËÀ´Ëµ£¬PHPÌ«¼òµ¥ÁË¡£Ïà·´µÄ£¬Èç¹ûÄã¶ÔPHPÁ˽â½Ï¶à£¬ÄÇôÄã¶ÔÓÚÆäËû¼¸ÖÖÓïÑÔµÄѧϰ¶¼ºÜ¼òµ¥ÁË¡£
¡¡¡¡ÄãÖ»ÐèÒª30·ÖÖӾͿÉÒÔ½«PHPµÄºËÐÄÓïÑÔÌصãÈ«²¿ÕÆÎÕ£¬Äã¿ÉÄÜÒѾ­·Ç³£Á˽âHTML£¬ÉõÖÁÄãÒѾ­ÖªµÀÔõÑùÓñ༭Éè¼ÆÈí¼þ»òÕßÊÖ¹¤À´ÖÆ×÷ºÃ¿´µÄWEB
Õ¾µã¡£ÓÉÓÚPHP´úÂëÄܹ»ÎÞÕÏ°­µÄÌí¼Ó½øÄãµÄÕ¾µã£¬ÔÚÄãÉè¼ÆºÍά»¤Õ¾µãµÄͬʱ£¬Äã¿ÉÒÔºÜÇáËÉ


Ïà¹ØÎĵµ£º

PHP»ñȡʱ¼ä´íÎóµÄÐÞÕý·½·¨

PHP»ñȡʱ¼ä´íÎóµÄÐÞÕý·½·¨
   ½ñÌìÔËÐÐPHP³ÌÐòµÄʱºò£¬ºÜÆæ¹Ö£¬ÎªÊ²Ã´PHP»ñÈ¡µÄʱ¼ä±Èʵ¼Êʱ¼äÕûÕûÉÙÁË8Сʱ£¬ÒÔǰҲûעÒâÕâ¸öÎÊÌ⣬×ÜÒÔΪÊÇʱ¼äÏÔʾ´íÁË£¬ÊÇ°²×°Èí¼þµÄÎÊÌ⣬½ñÌìÔÚÍøÉϲéÁËÏÂ×ÊÁÏ£¬Ô­À´ÁíÓÐÔ­Òò¡£
   ÆäʵÕâºÍʱÇøÓйأ¬PHPĬÈÏ»ñÈ¡0ʱÇø¿ªÊ¼µÄʱ¼ä£¬ÖйúÔÚ¶«°ËÇø£¬Òò´Ë£¬ÎÒÃÇÖÐ ......

phpÖлñÈ¡¸÷ÖÖ·¾¶

test.php -------------------------------------------------------------------------------------
echo $_SERVER['DOCUMENT_ROOT'].""; //»ñµÃ·þÎñÆ÷Îĵµ¸ù
echo $_SERVER['PHP_SELF'].""; //»ñµÃÖ´ÐиôúÂëµÄÎļþ·þÎñÆ÷¾ø¶Ô·¾¶
/*
phpÊÖ²áÉϵĽâÊÍ£º “PHP_SELF” µ±Ç°ÕýÔÚÖ´Ðнű¾µÄÎļþÃû£¬Óë docum ......

php list·½·¨µÄÃîÓÃ

Ò»¸ö¼òµ¥µÄÀý×Ó¶ÁÈ¡CSVÎļþ£º
<?php
$handle=fopen("test.csv","r");
echo "<table border=2>";
//ÅäºÏwhileÑ­»·¶ÁÈ¡Îļþ
while($data=fgetcsv($handle,1024))
{
list($user,$pwd,$partment,$title)=$data;
echo "<tr>
<td>$user</td>
<td>$pwd< ......

phpÎļþϵͳº¯Êý¿â

basename: ·µ»Ø²»º¬Â·¾¶µÄÎļþ×Ö·û´®¡£
chgrp: ¸Ä±äÎļþËùÊôµÄȺ×é¡£
chmod: ¸Ä±äÎļþµÄÊôÐÔ¡£
chown: ¸Ä±äÎļþµÄÓµÓÐÕß¡£
clearstatcache: Çå³ýÎļþ״̬¿ìÈ¡¡£
copy: ¸´ÖÆÎļþ¡£
delete: ÎÞÓõÄÏîÄ¿¡£
dirname: È¡µÃ·¾¶ÖеÄĿ¼Ãû¡£
diskfreespace: È¡µÃĿ¼ËùÔÚµÄÊ£Óà¿ÉÓÿռ䡣
fclose: ¹Ø±ÕÒÑ´ò¿ªµÄ ......

ʵÀýÏê½âPHP serializeÓëJSON½âÎö

JSON
»ù
ÓÚJavaScript Programming Language, Standard ECMA-262 3rd Edition -
December 1999µÄÒ»¸ö×Ó¼¯¡£JSON²ÉÓÃÍêÈ«¶ÀÁ¢ÓÚÓïÑÔµÄÎı¾¸ñʽ£¬µ«ÊÇҲʹÓÃÁËÀàËÆÓÚCÓïÑÔ¼Ò×åµÄÏ°¹ß£¨°üÀ¨C, C++, C#, Java
, JavaScript, Perl, PythonµÈ£©¡£ÕâЩÌØÐÔʹJSON³ÉΪÀíÏëµÄÊý¾Ý½»»»ÓïÑÔ¡£
JSON½¨¹¹ÓÚÁ½Öֽṹ£º
“Ãû
³ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ