×îÁî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£¬ÄãÒ²¿ÉÒÔÈ¥ÕÒ×îе
Ïà¹ØÎĵµ£º
ÔÚPHPÍøÕ¾¿ª·¢ÖУ¬ÎªÁËÂú×ãÍøÕ¾µÄÐèÒª£¬Ê±³£ÐèÒª¶ÔPHP»·¾³±äÁ¿½øÐÐÉèÖúÍÓ¦Óã¬ÔÚÐéÄâÖ÷»ú»·¾³Ï£¬ÓÐʱÎÒÃǸüÐèҪͨ¹ýPHP»·¾³±äÁ¿²Ù×÷º¯ÊýÀ´¶ÔPHP»·¾³±äÁ¿Öµ½øÐÐÉèÖá£Îª´ËÎÒÃÇÓбØÒª¶ÔPHP»·¾³±äÁ¿ÏÈÓÐËùÊìϤ¡£½ñÌìºÍ´ó¼Ò·ÖÏíPHP»·¾³±äÁ¿$_SERVERºÍPHPϵͳ³£Á¿µÄ²¿·ÖÏêϸ˵Ã÷¡£
¡¡¡¡PHP»·¾³±äÁ¿Ö÷ÒªÓÐ$GLOBALS[]¡¢$_SERVER ......
±êÌâÓе㳤£¬Æäʵ¾ÍÊÇÓÃÀ´Ïòhttps·þÎñÆ÷postÊý¾Ý
function curlPost($url, $data, $timeout = 30)
{
$ssl = substr($url, 0, 8) == "https://" ? TRUE : FALSE;
$ch = curl_init();
$opt = array(
CURLOPT_URL => $url,
CURLOPT_POST => 1,
CURLOPT_ ......
ϵͳ¼°Èí¼þ°æ±¾
FreeBSD 7.3
Apache-2.2.14-5[ 1.3.42£¨Unix£©]
PHP-5.2.12
MySQL-5.0.90
Freebsdͨ¹ýport°²×°nginx
Nginx ("engine x") ÊÇÒ»¸ö¸ßÐÔÄÜµÄ HTTP ºÍ·´Ïò´úÀí·þÎñÆ÷£¬Ò²ÊÇÒ»¸ö IMAP/POP3/SMTP ´úÀí·þÎñÆ÷¡£ Nginx ÊÇÓÉ Igor Sysoev Ϊ¶íÂÞ˹·ÃÎÊÁ¿µÚ¶þµÄ Rambler.ru Õ¾µã¿ª·¢µÄ£¬ËüÒѾÔÚ¸ÃÕ¾µãÔËÐг¬¹ýÁ½ ......
<?php
class Model_Data_FocusData{
....
public function getData(){...}
}
class Model_Data_IndexData{
....
public function getData(){...}
}
?>
ÓÐÕâô¼¸¸öÀ࣬ϣÍûÄܹ»×Ô¶¯µÄ¸ù¾Ý²ÎÊýÀ´µ÷Óò»Í¬µÄÀà´¦ÀíÊý¾Ý¡£
¿´µ÷ÓÃÄ£¿é£º
<?php
function getData($act){
$class = "Mode ......
it is 21th of May. The Month of PHP Security
(http://www.php-security.org) is still running and we have reached a
vulnerability count of 40 vulnerabilities, which is nearly as much as we
disclosed during the whole Month of PHP Bugs in 2007. However there are
11 more days until the end of May and ......