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

PHP µ÷ÊÔÖ¸ÄÏ


Ò»¡¢Ç°Ìá
       ÎÒÃÇÐèÒªÒ»¸ö Web ·þÎñÆ÷À´½âÎöÓà PHP ´´½¨µÄÒ³Ãæ²¢°ÑËüÃÇÏÔʾµ½ä¯ÀÀÆ÷¡£±¾ÎÄÖÐʹÓõÄÊÇ Apache2¡£µ«ÊÇ£¬ÈκΠWeb ·þÎñÆ÷¶¼¿ÉÒÔÂú×ãÒªÇó¡£
       ÒªÀûÓñ¾ÎÄÖнéÉܵÄһЩµ÷ÊÔ¼¼Êõ£¬ÐèÒª°²×° Eclipse V3.1.1 ºÍ²å¼þ PHPEclipse V1.1.8¡£ÓÉÓÚ Eclipse ÒªÇó Java™ ¼¼Êõ£¬ËùÒÔ»¹ÒªÏÂÔØËü¡£
       »¹ÐèÒª PHP µÄµ÷ÊÔÆ÷À©Õ¹Ä£¿é¡£°²×°ËüÂÔÓÐЩÂé·³¡£Çë×Ðϸ¸úËæ°²×°µ÷ÊÔÆ÷À©Õ¹µÄ²Ù×÷˵Ã÷¡£ÏÖÔÚ£¬ÏÈÔÚ php.ini ÎļþÖÐ×¢Ê͵ôÄÇЩҪÇó×°ÈëºÍÅäÖà PHP À©Õ¹µÄÐС£ÔÚÐèҪʹÓõ÷ÊÔÆ÷µÄʱºò£¬ÔÙÈ¡Ïû×¢ÊÍ¡£
  
PHP µÄ´íÎ󱨸æ
php.ini ÎļþÖÐÓÐÐí¶àÅäÖÃÉèÖá£ÄúÓ¦µ±ÒѾ­ÉèÖúÃ×Ô¼ºµÄ php.ini Îļþ²¢°ÑËü·ÅÔÚºÏÊʵÄĿ¼ÖУ¬¾ÍÏñÔÚ Linux ÉÏ°²×° PHP ºÍ Apache 2 µÄÎĵµËµÃ÷ÖÐËùʾµÄÄÇÑù£¨Çë²ÎÔÄ ²Î¿¼×ÊÁÏ
£©¡£ÔÚµ÷ÊÔ PHP Ó¦ÓóÌÐòʱ£¬Ó¦µ±ÖªµÀÁ½¸öÅäÖñäÁ¿¡£ÏÂÃæÊÇÕâÁ½¸ö±äÁ¿¼°ÆäĬÈÏÖµ£º
display_errors = Off
error_reporting = E_ALL
ͨ¹ýÔÚ php.ini ÎļþÖÐËÑË÷ËüÃÇ£¬¿ÉÒÔ·¢ÏÖÕâÁ½¸ö±äÁ¿µ±Ç°µÄĬÈÏÖµ¡£display_errors
±äÁ¿µÄÄ¿µÄºÜÃ÷ÏÔ —— Ëü¸æËß PHP ÊÇ·ñÏÔʾ´íÎó¡£Ä¬ÈÏÖµÊÇ Off
¡£µ«ÊÇ£¬ÒªÈÿª·¢¹ý³Ì¸ü¼ÓÇáËÉ£¬Çë°ÑÕâ¸öÖµÉèΪ On
£º
display_errors = On
error_reporting
±äÁ¿µÄĬÈÏÖµÊÇ E_ALL
¡£Õâ¸öÉèÖûáÏÔʾ´Ó²»Á¼±àÂëʵ¼ùµ½ÎÞº¦Ìáʾµ½³ö´íµÄËùÓÐÐÅÏ¢¡£E_ALL
¶ÔÓÚ¿ª·¢¹ý³ÌÀ´ËµÓеã̫ϸ£¬ÒòΪËüÔÚÆÁÄ»ÉÏΪһЩСÊ£¨ÀýÈç±äÁ¿Î´³õʼ»¯£©Ò²ÏÔʾÌáʾ£¬»á¸ãÔãä¯ÀÀÆ÷µÄÊä³ö¡£ÎÒÖ»Ïë¿´µ½´íÎóºÍ²»Á¼±àÂëʵ¼ù£¬µ«ÊDz»Ïë¿´µ½ÎÞº¦µÄÌáʾ¡£ËùÒÔ£¬ÇëÓÃÒÔÏÂÖµ´úÌæ error_reporting
µÄĬÈÏÖµ£º
error_reporting = E_ALL & ~E_NOTICE
ÖØÐÂÆô¶¯ Apache£¬¾ÍÈ«²¿ÉèÖúÃÁË¡£½ÓÏÂÀ´£¬½«Ñ§Ï°ÈçºÎÔÚ Apache ÉÏ×öͬÑùµÄÊ¡£
·þÎñÆ÷ÉϵĴíÎ󱨸æ
ÒÀÀµÓÚ Apache ÕýÔÚ×öµÄ¹¤×÷£¬ÔÚ PHP Öдò¿ª´íÎ󱨸æ¿ÉÄÜû·¨¹¤×÷£¬ÒòΪÔÚ¼ÆËã»úÉÏ¿ÉÄÜÓжà¸ö PHP °æ±¾¡£ÓÐʱºÜÄÑÇø·Ö
Apache ÕýÔÚʹÓÃÄĸö PHP °æ±¾£¬ÒòΪ Apache Ö»Äܲ鿴һ¸ö php.ini Îļþ¡£²»ÖªµÀ Apache ÕýÔÚʹÓÃÄĸö
php.ini ÎļþÅäÖÃ×Ô¼ºÊÇÒ»¸ö°²È«ÎÊÌâ¡£µ«ÊÇ£¬ÓÐÒ»ÖÖ·½·¨¿ÉÒÔÔÚ Apache ÖÐÅäÖà PHP ±äÁ¿£¬´Ó¶ø±£Ö¤ÉèÖÃÁËÕýÈ·µÄ³ö´í¼¶±ð¡£
¶øÇÒ£¬×îºÃÖªµÀÈçºÎÔÚ·þÎñÆ÷¶ËÉèÖÃÕâЩÅäÖñäÁ¿£¬ÒÔ·ñ¾ö»òÇÀÕ¼ php.ini Îļþ£¬´Ó¶øÌṩ¸ü¸ß¼¶±ðµÄ°


Ïà¹ØÎĵµ£º

phpµÄsessionÒªÔÚÆäËûÒ³ÃæÔõôµÃµ½

²»ÊǺÜÔÞͬʹÓÃsession   ÿһ¸öphpµÄÒ³ÃæÔÚµ÷ÓÃsessionµÄʱºò¶¼±ØÐëÏÈÉùÃ÷session¡£
ÀýÈ磺ÔÚphpÎļþµÄ×îÇ°ÃæÉùÃ÷session;
<?php
session_start();//ÉùÃ÷session
$_SESSION['id']=$_POST['id'];//¸³Öµ
?>
Èç¹û²»ÕâÑùÉùÃ÷µÄ»°£¬Ò²Ãâ¾ÍÎÞ·¨»ñµÃÒѾ­¶¨ÒåºÃµÄsessio ......

PHP»á»°(Session)ʹÓÃÈëÃÅ

¶Ô±ÈÆð Cookie£¬Session ÊÇ´æ´¢ÔÚ·þÎñÆ÷¶ËµÄ»á»°£¬Ïà¶Ô°²È«£¬²¢ÇÒ²»Ïñ Cookie ÄÇÑùÓд洢³¤¶ÈÏÞÖÆ£¬±¾Îļòµ¥½éÉÜ Session µÄʹÓá£
ÓÉÓÚ Session ÊÇÒÔÎı¾ÎļþÐÎʽ´æ´¢ÔÚ·þÎñÆ÷¶ËµÄ£¬ËùÒÔ²»Å¿ͻ§¶ËÐÞ¸Ä Session ÄÚÈÝ¡£Êµ¼ÊÉÏÔÚ·þÎñÆ÷¶ËµÄ Session Îļþ£¬PHP ×Ô¶¯ÐÞ¸Ä Session ÎļþµÄȨÏÞ£¬Ö»±£ÁôÁËϵͳ¶ÁºÍдȨÏÞ£¬¶ø ......

php×ܽᣨ4£©

apache ¶¯Ì¬±àÒë ±àÒë³Éso ¾²Ì¬±àÒë C ЧÂʸß5% ÏÈÍêÈ«¶¯Ì¬±àÒ룬ȷ¶¨ÐèÒªµÄ ¾²Ì¬±àÒë ºÏÀíʹÓûỰ ¾¡¿ÉÄÜÉٵļÓÔØÍⲿÎļþ ¾¡¿ÉÄÜÉÙµÄÕ¼ÓÃÍⲿ×ÊÔ´ lazyload ³ÙÁ¬½ÓÔçÊÍ·Å ±äÁ¿Ó¦¾¡¿ÉÄܵı£³ÖÒ»ÖÖÀàÐÍ ¸Ä±ä±äÁ¿ÀàÐ͵Äʱºò£¬Ö»»á×Ô¶¯ÔöËùÕ¼ÄÚ´æ ²»»á¼õÉÙ Èçint->float  Õ¼¿Õ¼ä±ä´ó float->int ²»»á±äС ......

phpѧϰÊղأºPHPÊý×éµÄ×ܽá

 
Ò»¡¢Ê²Ã´ÊÇÊý×é
Êý×é¾ÍÊÇÒ»×éÊý¾ÝµÄ¼¯ºÏ£¬°ÑһϵÁÐÊý¾Ý×éÖ¯ÆðÀ´£¬ÐγÉÒ»¸ö¿É²Ù×÷µÄÕûÌå¡£Êý×éµÄÿ¸öʵÌ嶼°üº¬Á½Ï¼üºÍÖµ¡£
¶þ¡¢ÉùÃ÷Êý¾Ý
ÔÚPHPÖÐÉùÃ÷Êý×éµÄ·½Ê½Ö÷ÒªÓÐÁ½ÖÖ£ºÒ»ÊÇÓ¦ÓÃarray()º¯ÊýÉùÃ÷Êý×飬һÊÇÖ±½ÓΪÊý×éÔªËظ³Öµ¡£
<1>array()º¯ÊýÉùÃ÷µÄÊý×éµÄ·½Ê½array([mixed...]) ²ÎÊýmixedµÄÓï·¨ ......

PHPnow = Apache + PHP + MySQL + phpMyAdmin

 
PHPnow ÊÇʲô?
Win32 ÏÂÂÌÉ«Ãâ·ÑµÄ Apache + PHP + MySQL »·¾³Ì×¼þ°ü¡£
¼òÒ×°²×°¡¢¿ìËٴ֧³ÖÐéÄâÖ÷»úµÄ PHP »·¾³¡£¸½´ø PnCp.cmd ¿ØÖÆÃæ°å£¬°ïÖúÄã¿ìËÙÅäÖÃÄãµÄÌ×¼þ£¬Ê¹Ó÷dz£·½±ã¡£
PHPnow ÊÇÂÌÉ«µÄ£¬½âѹºóÖ´ÐÐ Init.cmd ³õʼ»¯£¬¼´¿ÉµÃµ½Ò»¸ö PHP + MySQL »·¾³¡£
È»ºó¾Í¿ÉÒÔÖ±½Ó°²×° Discuz!, PHPWind, ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ