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

×îÁîPHP³õѧÕßÍ·Í´µÄÊ®ËĸöÎÊÌâ


¡¾1¡¿Ò³ÃæÖ®¼äÎÞ·¨´«µÝ±äÁ¿ get,post,sessionÔÚ×îеÄphp°æ±¾ÖÐ×Ô¶¯È«¾Ö±äÁ¿Êǹرյģ¬ËùÒÔÒª´ÓÉÏÒ»Ò³ÃæÈ¡µÃÌá½»¹ýÀ´µÃ±äÁ¿ÒªÊ¹ÓÃ$_GET['foo'],$_POST['foo'],$_SESSION['foo']À´µÃµ½¡£µ±È»Ò²¿ÉÒÔÐÞ¸Ä×Ô¶¯È«¾Ö±äÁ¿Îª¿ª(php.ini¸ÄΪregister_globals = On)£»¿¼Âǵ½¼æÈÝÐÔ£¬»¹ÊÇÇ¿ÆÈ×Ô¼ºÊìϤеÄд·¨±È½ÏºÃ¡£
¡¡¡¡¡¾2¡¿Win32ÏÂapache2 ÓÃget·½·¨´«µÝÖÐÎIJÎÊý»á³ö´í£º
¡¡¡¡test.php?a=ÄãºÃ&b=ÄãÒ²ºÃ
¡¡¡¡´«µÝ²ÎÊýÊǻᵼÖÂÒ»¸öÄÚ²¿´íÎó
¡¡
¡¡¡¡½â¾ö°ì·¨:"test.php?a=".urlencode(ÄãºÃ)."&b=".urlencode(ÄãÒ²ºÃ)
¡¡¡¡ .............
¡¡¡¡¡¾3¡¿win32ϵÄsession²»ÄÜÕý³£¹¤×÷
¡¡¡¡php.iniĬÈϵÄsession.save_path = /tmp
¡¡¡¡ÕâÏÔÈ»ÊÇlinuxϵÄÅäÖã¬win32ÏÂphpÎÞ·¨¶ÁдsessionÎļþµ¼ÖÂsessionÎÞ·¨Ê¹Ó㬰ÑËü¸Ä³ÉÒ»¸ö¾ø¶Ô·¾¶¾Í¿ÉÒÔÁË£¬ÀýÈçsession.save_path = c:windows emp
¡¡¡¡¡¾4¡¿ÏÔʾ´íÎóÐÅÏ¢
¡¡¡¡µ±php.iniµÄdisplay_errors = On²¢ÇÒerror_reporting = E_ALLʱ£¬½«ÏÔʾËùÓеĴíÎóºÍÌáʾ£¬µ÷ÊÔµÄʱºò×îºÃ´ò¿ªÒÔ±ã¾À´í£¬Èç¹ûÄãÓÃÒÔÇ°phpд·¨´íÎóÐÅÏ¢¶à°ëÊǹØÓÚ䶨Òå±äÁ¿µÄ¡£±äÁ¿ÔÚ¸³ÖµÒÔÇ°µ÷ÓûáÓÐÌáʾ£¬½â¾ö°ì·¨ÊÇ̽²â»òÕßÆÁ±Î¡£
¡¡¡¡ÀýÈçÏÔʾ$foo£¬¿ÉÒÔif(isset($foo)) echo $foo »òÕßecho @$foo
¡¡¡¡¡¾5¡¿Win32ÏÂmail()²»ÄÜ·¢Ë͵ç×ÓÓʼþ
¡¡¡¡ÔÚlinuxÏÂÅäÖúõÄsendmail¿ÉÒÔ·¢ËÍ£¬ÔÚwin32ÏÂÐèÒªµ÷ÓÃsmtp·þÎñÆ÷À´·¢Ë͵ç×ÓÓʼþ£¬ÐÞ¸Äphp.iniµÄSMTP = ip //ipÊDz»´øÑéÖ¤¹¦ÄܵÄsmtp·þÎñÆ÷(ÍøÉϺÜÄÑÕÒµ½)
¡¡¡¡php·¢ËÍÓʼþµÄ×îºÃ½â¾ö·½·¨ÊÇÓÃsocketÖ±½Ó·¢Ë͵½¶Ô·½email·þÎñÆ÷¶ø²»ÓÃת·¢·þÎñÆ÷¡£
¡¡¡¡¡¾6¡¿³õ×°µÄmysqlÈç¹ûûÓÐÉèÖÃÃÜÂ룬Ӧ¸ÃʹÓÃupdate mysql.user set password="yourpassword" where user="root" ÐÞ¸ÄÃÜÂë
¡¡¡¡¡¾7¡¿header already sent
¡¡¡¡Õâ¸ö´íÎóͨ³£»áÔÚÄãʹÓÃHEADERµÄʱºò³öÏÖ£¬Ëû¿ÉÄÜÊǼ¸ÖÖÔ­Òò£º1£¬ÄãÔÚʹÓÃHEADERÇ°PRING»òÕßECHOÁË2.Ä㵱ǰÎļþÇ°ÃæÓпÕÐÐ3.Äã¿ÉÄÜINCLUDEÁËÒ»¸öÎļþ,¸ÃÎļþβ²¿ÓпÕÐлòÕßÊä³öÒ²»á³öÏÖÕâÖÖ´íÎó¡££¡
¡¡¡¡¡¾8¡¿¸ü¸Äphp.iniºóûÓб仯
¡¡¡¡ÖØÐÂÆô¶¯web server£¬±ÈÈçIIS£¬ApacheµÈµÈ£¬È»ºó²Å»áÓ¦ÓÃ×îеÄÉèÖá£
¡¡¡¡¡¾9¡¿phpÔÚ2003ÉÏÃæ°²×°£¨ISAPIµÄ°²×°·½·¨¿ÒÇë¸ßÊÖÖ¸½Ì£©
¡¡¡¡PHP4µÄphp4isapi.dllºÃÏñºÍ2003ÓÐЩ³åÍ»£¬Ö»ÄÜÓÃCGIģʽ°²×°
¡¡¡¡²½ÖèÒ»£¬ÏÈwww.php.net ÏÂÔÚÒ»¸ö°²×°³ÌÐò£¬ÎÒÊÇ×°µÄÊÇ£ºphp-4.2.3-installer.exe£¬ÄãÒ²¿ÉÒÔÈ¥ÕÒ×îе


Ïà¹ØÎĵµ£º

fedoraÏÂphp»·¾³ÅäÖÃ

±àÒë°²×°
apache
ÏÂÔØapache°²×°
=============================
ÎÒ°ÑËû°²×°ÔÚ/usr/local/apacheĿ¼ÏÂ
tar -zxvf apacheÎļþ
½øÈë½âѹºóµÄĿ¼£¬ÅäÖÃ./configure --prefix=/usr/local/apache -enable-mods-shared=all -enable-so -enable-rewrite
make
make install
È»ºóÆô¶¯/usr/local/apache/bin/apachectl sta ......

PHP »·¾³±äÁ¿

ÔÚPHPÍøÕ¾¿ª·¢ÖУ¬ÎªÁËÂú×ãÍøÕ¾µÄÐèÒª£¬Ê±³£ÐèÒª¶ÔPHP»·¾³±äÁ¿½øÐÐÉèÖúÍÓ¦Óã¬ÔÚÐéÄâÖ÷»ú»·¾³Ï£¬ÓÐʱÎÒÃǸüÐèҪͨ¹ýPHP»·¾³±äÁ¿²Ù×÷º¯ÊýÀ´¶ÔPHP»·¾³±äÁ¿Öµ½øÐÐÉèÖá£Îª´ËÎÒÃÇÓбØÒª¶ÔPHP»·¾³±äÁ¿ÏÈÓÐËùÊìϤ¡£½ñÌìºÍ´ó¼Ò·ÖÏíPHP»·¾³±äÁ¿$_SERVERºÍPHPϵͳ³£Á¿µÄ²¿·ÖÏêϸ˵Ã÷¡£
¡¡¡¡PHP»·¾³±äÁ¿Ö÷ÒªÓÐ$GLOBALS[]¡¢$_SERVER ......

Ëæ»úÑ¡Ôñ¶à×éÊý¾ÝµÄÆäÖÐÒ»×éPHP´úÂë

ÕâÊÇËæ»úÑ¡ÔñA0-A3ËÄ×éÊý¾ÝÖÐÆäÖÐÒ»×éPHP´úÂë:
<?php
$A[0]="QQ:<font color=ff32000>7161283</font>";
$A[1]="E_mail:<font color=ff32000>15018499772@139.com</font>";
$A[2]="ÊÖ»ú:<font color=ff32000>15018499772</font>";
$A[3]="MSN:<font color=ff32000>chinaa ......

PHPͨ¹ýsession id ʵÏÖsession¹²ÏíºÍµÇ¼ÑéÖ¤[ת]

http://edu.codepub.com/2010/0131/20248.php
ÆäʵÕâ¸öÓ¦¸Ã²»ËãÊÇÒÉÄÑÎÊÌ⣬¾ÍÊÇphpÖÐÓàsessionidµÃµ½sessionµÄÖµ£¬ÒòΪµÄÈ·ºÜ¼òµ¥£¬Ö»ÊÇ¿ÉÄÜ´ó¼ÒƽʱÓò»µ½ËùÒÔûÓÐ×¢Òâµ½°ÕÁË¡£
 
ÏÈ˵˵£¬Õâ¸ö»úÖƵÄÓÃ;°É£¬µ½ÏÖÔÚΪֹսµØÖªµÀÕâ¸ö»úÖÆÓÐÁ½¸ö·½ÃæµÄÓÃ;£º
ÆäʵÕâ¸öÓ¦¸Ã²»ËãÊÇÒÉÄÑÎÊÌ⣬¾ÍÊÇphpÖÐÓà sessi ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ