PHP£ºÂ·Ôںη½£¿
PHP4:Ææ¼£±³ºó
1995Äêʱ£¬RasmusÔÚÓÃPHPдËûµÄ¸öÈËÖ÷Ò³£»½ñÌ죬PHP³ÉΪ·çÃÒÈ«ÇòµÄ½Å±¾ÓïÑÔ£¬Ô½À´Ô½¶àµÄÕ¾µãÑ¡ÔñʹÓÃPHP£¬Á¬Yahoo¶¼·ÅÆúÁË×Ô¼ºµÄ½Å±¾¶ø¸ÄÓÃPHPÖ§³ÖËüµÄÍøÕ¾¡£¿ÉÒÔ˵£¬PHPÊÇÒ»¸öÆæ¼£¡£ÎÒÒ»Ö±ÈÏΪ£¬ÈκÎÆæ¼£±³ºó¶¼ÓÐËüµÄÔÒò¡£ÏÖÔÚ£¬¾ÍÈÃÎÒÃÇ͸¹ýÕâ¸öÆæ¼££¬À´¿´¿´PHPµÄ³É¹¦Ö®µÀ¡£
1 ¼òµ¥Ò×ÓÃ
PHPµÄÈëÃÅÃż÷ºÜµÍ£¬Ëü¶ÔʹÓÃÕßµÄÒªÇó΢ºõÆä΢¡£Ñ§¹ýCÓïÑÔµÄÈË£¬Ê¹ÓÃPHP¼¸ºõ²»ÐèҪʲôʱ¼ä¡£ËüÃǵÄÓï·¨ÊÇÈç´ËÏàËÆ£¬ÒÔÖÁÓÚÎÒ³£³£Ï룬ÊDz»ÊÇÔÚCÓïÑÔ±äÁ¿Ç°¼Ó¸ö$¾ÍÄܸijÉPHP¡£ÕâʹµÃ´óÁ¿C³ÌÐòÔ±ÔÚÍøÂç½Å±¾ÖÐÑ¡ÔñÁËPHP¡£ÁíÍ⣬±ÈÆðASPµÄ×é¼þϵͳºÍJavaÅÓ´óµÄÀà¿âÀ´£¬PHPµÄº¯Êý¿âÒªºÃѧ¶àÁË¡£ÔÚ±à³Ì·ç¸ñÉÏ£¬PHP¸üÊÇ×ÔÓÉ£¬Äã¿ÉÒÔʹÓÃNÖÖ·ç¸ñÀ´Ð´ÄãµÄ½Å±¾³ÌÐò¡£ÕâЩÌØÐÔʹµÃPHP³ÉΪ³õѧÕßµÄÊ×Ñ¡ÓïÑÔ¡£ÇÀÕ¼³õѧÕßÊг¡ÊǺÜÖØÒªµÄ²ßÂÔ¡£ÈçͬÈκÎÈ˶¼»á¶Ô×Ô¼ºµÄ³õÁµ¼ÇÒäÓÌÐÂÒ»Ñù£¬ÈËÃÇÍùÍù»á¶Ô×î³õѧϰµÄÓïÑÔÓкÜÉîµÄ¸ÐÇé¡£¼´Ê¹ºóÀ´×Ô¼º³É³¤ÁË£¬¸ÄÓÃÆäËûÓïÑÔÁË£¬»¹ÊÇ»áʱʱ¼ÇÆð×î³õѧϰµÄÓïÑÔ¡£ÔÚÕâµãÉÏ£¬PHP×öµÃºÜ³öÉ«¡£
2 ¼ô²ÃµÃµ±
PHP¿ª·¢×éÊÇ×îÁ˽âÍøÂçµÄһȺÈË£¬ËûÃǷdz£Çå³þÓû§ÒªµÄÊÇʲô¡£PHP¾ÍÊÇÒª×öÒ»¸ö³öÉ«µÄÍøÂç½Å±¾ÓïÑÔ£¬¶øÇÒ£¬ËüÖ»ÊÇÒª×öÒ»¸öÍøÂç½Å±¾ÓïÑÔ¡£PHPÌṩµÄº¯Êý¼¯ÔÚÍøÂç·½ÃæÏ൱ǿ´ó£¬¶øÇÒÖصã¾ùרעÓÚÍøÂçÓ¦Óá£ÏñPHPÖеÄÎÞ×é¼þÎļþÉÏ´«£¬³¬¶àÊý¾Ý¿âÖ§³ÖµÈÌØÐÔ¶¼±íÏÖ³öÕâ¸öÌص㡣˳±ã˵һ¾ä£¬PHPÉõÖÁÖ§³ÖACCESSÊý¾Ý¿â¡£×¨×¢Ê¹µÃPHPÔÚÍøÂçÉϱíÏÖ³ö¼«ÆäÓÅÐãµÄÐÔÄÜ¡£ÓÐʧ²ÅÄÜÓеá£
3 Ö§³ÖÇ¿´ó
PHPÓÐÇ¿´óµÄOpenSourceÍÅÌåÖ§³Ö£¬ÔÚÍøÂçÉÏÓÐÊýÒÔÍò¼ÆµÄ¿ªÔ´´úÂë¡£Äã¿ÉÒÔÕûºÏ¼¸¸öÏÖÓгÌʽÀ´ÊµÏÖÄãµÄÓ¦Óã¬Ò²¿ÉÒÔ·ÖÎö´óʦ¼¶µÄ´úÂëÀ´µÃµ½Ìá¸ß¡£PHP»¹ÓкܶàÀ©Õ¹ÐÔµÄÏîÄ¿À´ÔöÇ¿PHPÔÚij¸ö·½ÃæµÄ¹¦ÄÜ¡£Ïñ×¢Öرà³Ì¹æ·¶»¯ºÍ´úÂëÖØÓõÄPEAR£¬Ìṩ¿É±àÒëÄ£°å¼¼ÊõµÄSmarty£¬ÉõÖÁ¿ª·¢×ÀÃæ³ÌÐòµÄGTK¡£
·ÖÎöÍêÕ⼸¸öÀíÓÉ£¬ÎÒÃÇ¿ÉÒÔ¿´³ö£¬PHPµÄ³É¹¦µÃÒæÓÚPHP¿ª·¢×éµÄÕ½ÂÔÑ۹⡣PHPÌṩÁËÒ»¸ö×îС¹¤×÷¼¯£¬Ê¹Óû§ÄÜÓÃ×î¼òµ¥µÄ·½Ê½¸ßЧµØÍê³É×Ô¼ºÐèÒªµÄÓ¦Óá£ÕâÕýÊdzõѧÕßÐèÒªµÄ¡£È»ºóËüͨ¹ý·½±ãµÄÀ©Õ¹À´Ìṩ¸÷¸ö·½ÃæµÄ½â¾ö·½°¸£¬ÕâÑù£¬ÄãÖ»ÐèҪѧÄãÒªÓõ½µÄÄǸöÁìÓòµÄ¶«Î÷¡£µ±ÄãÉæ¼°µÄÁìÓòÔ½À´Ô½¶àʱ£¬ÄãµÄˮƽҲËæÖ®Ìá¸ß£¬µ±ÄãÊìϤÁË´ó¶àÁìÓòʱ£¬»ØÍ·¿´¿´£¬»á·¢ÏÖ²»Öª²»¾õÒѵ½É½Ñü¡£PHPÒ²ÌṩÁËÎÒÃÇÒ»ÖÖѧϰ̬¶È¡£
ASP.net£«J2EE:·çÓêÓûÀ´
ÍøÂç½Å±¾½çµÄ¸ïÐÂÀ˳±ÓÉMicrosoftµÄASP.netÊ×ÏÈ·¢Æð¡£ÔÚASP.netÖУ¬ÓÐÒ»¸öºÜÎüÒýÈ˵Ķ«Î÷——
Ïà¹ØÎĵµ£º
°²×°WAPMServ5.2.6ºó,ÓÃDreamweaver¿ÉÒÔ±àдºÍµ÷ÊÔPHP
Ê×ÏÈ£ºÒªÏÈÆôwapmserver,Æô¶¯ËùÓзþÎñ
È»ºó £ºÔÚDreamweaverÅäÖÃÕ¾µã£¬¾ßÌå²Ù×÷ÈçÏ£º
ÃèÊöϹؼüµÄ²½Ö裺
Ïȵý¨¸öÕ¾µã È»ºó
¸ß¼¶ Ñ¡Ï£º
·ÖÀࣺ±¾µØÐÅÏ¢
±¾µØ¸ùÎļþ¼Ð £¨Ñ¡ÔñPHPµÄ·¢²¼Îļþ¼Ð£©
Á´½ÓÏà¶ÔÓÚ Õ¾µã¸ùĿ¼
HTTPµØÖ· Http://localhost/
»º´æ Æ ......
ÏÖÔÚ°ÑÔÚIISÏ°²×°PHPµÄ¹ý³ÌÏêϸ¼Ç¼ÏÂÀ´±ãÓÚÈÕºóµÄѧϰ£»
ΪÁË·½±ã¸÷λ¶ÁÕßʹÓÃPHP£¬±ÊÕßÑ¡ÔñÁËPHP5.2°æ±¾£¬¶øIISÔòÊÇXPϵͳ×Ô´øµÄIIS 5¡£Ê×ÏÈÎÒÃÇÒª°²×°IIS×é¼þ£¬Ä¬ÈÏÇé¿öÏÂÔÚXPϵͳÊÇûÓа²×°µÄ¡£
¡¡µÚÒ»²½£ºÍ¨¹ý¿ØÖÆÃæ°åµÄÌí¼Ó/ɾ³ýWindows×é¼þÍê³ÉIIS×é¼þµÄ°²×°¹¤×÷¡£
¡¡µÚ¶ ......
תÔصÄPHPÃæÊÔÌâ
1. »ù±¾ÖªÊ¶µã
HTTPÐÒéÖм¸¸ö״̬ÂëµÄº¬Òå:503 500 401 200 301 302¡£¡£¡£
Include require include_once require_once µÄÇø±ð.
PHP/MysqlÖм¸¸ö°æ±¾µÄ½ø»¯Ê·£¬±ÈÈçmysql4.0µ½4.1£¬PHP 4.xµ½5.1µÄÖØ´ó¸Ä½øµÈµÈ¡£
HEREDOC½éÉÜ
д³öһЩphpħ»Ã·½·¨;
һЩ±àÒëphpʱµÄconfigure ²ÎÊý
Ïòphp´«Èë ......
PHP5.2.4֮ǰµÄ°æ±¾ÎÞÐèÉèÖÃʱÇø¡£ÏÂÃæÊÇÐÞ¸ÄPHPʱÇøµÄÈý¸ö°ì·¨¡£
1¡¢ÐÞ¸ÄPHP.iniÕâ¸öÎļþ
ÕÒµ½date.timezoneÕâÐУ¬È¥µôÇ°ÃæµÄ·ÖºÅ£¬¸Ä³É£º date.timezone = Asia/Shanghai 2¡¢ÐÞ¸Ä .htaccessÎļþ
ÐÞ¸Ä.htaccessÎļþÓÐÁ½ÖÖ°ì·¨£¬ÏÂÃæµÄÁ½ÌõÓï¾äÖ»ÒªÓÐÒ»Ìõ¼´¿É php_value date.timezone Asia/Shanghai
......
1. ÈçºÎÓÃphpµÄ»·¾³±äÁ¿µÃµ½Ò»¸öÍøÒ³µØÖ·µÄÄÚÈÝ£¿ipµØÖ·ÓÖÒªÔõÑùµÃµ½£¿
[php]
echo $_SERVER ['PHP_SELF'];
echo $_SERVER ['SERVER_ADDR'];
[/php]
2. ÇóÁ½¸öÈÕÆڵIJîÊý£¬ÀýÈç2007-2-5 ~ 2007-3-6 µÄÈÕÆÚ²îÊý
[php]
$begin=strtotime('2007-2-5');
$end=strtotime('2007-3-6');
echo ($end-$begin)/(24*3600);
[ ......