PHPÊÇʲô£¿
PHPÊÇʲô£¿
PHPÊÇÒ»ÖÖ¿ª·¢ÓïÑÔ£¬Ê¼´´ÓÚ1995Ä꣬¹Ù·½ÍøÕ¾www.php.net
PHPµÄÈ«³ÆÊdz¬Îı¾Ô¤´¦ÀíÆ÷£¨Hypertext Preprocessor£©
PHPÊÇÒ»ÖÖ´´½¨¶¯Ì¬½»»¥ÍøÕ¾µÄ·þÎñÆ÷¶Ë½Å±¾ÓïÑÔ£¬Í¨³£ÐèÒª´îÅäApache£¨Web·þÎñÆ÷Èí¼þ£©Ò»ÆðʹÓ㬲»¹ýÒ²¿ÉÒÔ´îÅäÆäËû·þÎñÆ÷Èí¼þ£¬ÈçIIS¡¢NginxµÈ¡£
PHPÊÇ×îÁ÷ÐеÄÍøÕ¾¿ª·¢ÓïÑÔÖ®Ò»£¬ÍêÈ«Ãâ·ÑʹÓ㬷dz£ÈÝÒ×ÉÏÊÖ£¬ÓëÁíÍâÈý¸ö¿ªÔ´Èí¼þ×é³É¾µäµÄLAMP×éºÏ£¨Linux+Apache+MySQL+PHP£©£¬ÉîÊܹã´óÍøÕ¾¿ª·¢ÕßµÄϲ°®¡£
PHP¿ÉÒÔÖ±½ÓǶÈëHTML´úÂëÖУ¬·Ç³£ÊʺÏÍøÕ¾¿ª·¢£¬ÏÂÃæÎÒÃÇ¿´¶Î´úÂë
Îı¾²é¿´¸´ÖÆ´úÂë´òÓ¡¹ØÓÚ
<html>
<head>
<title>365PHP – PHPÅàѵÓë½»Á÷ƽ̨</title>
</head>
<body>
<?php
echo “<h1>»¶Ó¹âÁÙ365PHP</h1>”;
?>
</body>
</html>
<html>
<head>
<title>365PHP – PHPÅàѵÓë½»Á÷ƽ̨</title>
</head>
<body>
<?php
echo “<h1>»¶Ó¹âÁÙ365PHP</h1>”;
?>
</body>
</html>
PHPÄÜ×öʲô£¿
PHPÖ÷ÒªÓÃÓÚÒÔÏÂÈý¸öÁìÓò
·þÎñÆ÷¶Ë½Å±¾£º¶¯Ì¬ÍøÕ¾¿ª·¢£¬365PHP¾ÍÊÇ»ùÓÚPHPÓïÒô£¬Ê¹ÓþµäµÄCMS¿ªÔ´ÏîÄ¿Joomla£¡½¨Á¢¶ø³É¡£
¿Í»§¶ËͼÐÎÓû§½çÃæ£¨GUI£ºGraphics User Interface£©£¬ÈçGTKÀ¦°óPHP¿ª·¢Óû§Í¼ÐνçÃæ¡£
ÃüÁîÐнű¾£ºPHP×öΪShell½Å±¾ÓïÑÔÀ´Ê¹Óá£
µ±È»PHPÖ÷ÒªÊÇÓÃÓÚ·þÎñÆ÷¶ËµÄ½Å±¾³ÌÐò£¬Òò´ËÄú¿ÉÒÔÓÃPHPÀ´Íê³ÉÈÎºÎÆäËûCGI³ÌÐòÄܹ»Íê³ÉµÄ¹¤×÷£¬ÀýÈçÊÕ¼¯±íµ¥Êý¾Ý¡¢Éú³É¶¯Ì¬ÍøÒ³¡¢·¢Éú/½ÓÊÕCookieµÈ£¬PHPµÄ¹¦ÄÜÔ¶²»¾ÖÏÞÓë´Ë¡£
PHPµÄÌØµã
PHPÊÇ¿ª·¢Ô´´úÂëµÄ£¬ÔËÐÐÓÚ·þÎñÆ÷¶ËµÄ½Å±¾ÓïÑÔ
¶ÀÁ¢ÓÚ²Ù×÷ϵͳ£¬¿ÉÒÔÔËÐÐÔÚ¼¸ºõËùÓÐϵͳÖÐ
Ö§³Ö´ó²¿·ÖµÄ·þÎñÆ÷Èí¼þ£¬ÈçApache¡¢IIS¡¢Ng
Ïà¹ØÎĵµ£º
$ip = "1.1.1.255".chr(0)."haha";
if(ereg("^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$",$ip)) {
echo $ip;
} else {
echo "unknown";
}
Õâ¸öeregÕýÔòÏÞÖÆÁË$ipµÄÊý¾ÝΪxxx.xxx.xxx.xxxÕâÑùµÄÐÎʽ£¬±íÃæÉÏ¿´ÉÏÃæµÄ´úÂëÓ¦¸ÃÊä³ö"unknown"£¬¶øÊµ¼ÊÈ´Êä³öÁË"1.1.1.255haha"£¬ÒòΪeregº¯Êý´æÔÚNULL½Ø¶Ï ......
ËäÈ»PHPÌṩÁ˺ܶ๦ÄÜÎÒÃÇ£¬µ«ÓÐЩÊÂÇ黹ûÓд¦ÀíÕâЩ·Ç³£·½±ã¡£ÀýÈ磬PHPÌṩµÄÈÕÆÚ¹¦ÄÜ£¬Ê±¼äºÜÓÐÏÞ¡£ MySQLÒѾÌṩÁËÐí¶àÎÒÃÇÕâЩ¹¦ÄÜ¡£ÎÒ¿ÉÒÔʹÓÃMySQLº¯ÊýÀ´´¦ÀíPHPµÄ¹ý³Ì£¿ÎÒÔÚÏÂÃæµÄ³¢ÊÔ¡£
“£¿ PHPµÄ
$ data_time =“1998-12-31 23:59:59”;
$ connect_id = mysql_connect£¨'±¾µØÖ÷»ú'£©;
......
PHP±äÁ¿µÄ±äÁ¿£¬¼´¿É±ä±äÁ¿
¿É±ä±äÁ¿µÄ¸ÅÄͨ¹ý»ñȡһ¸ö±äÁ¿µÄÖµ×öΪÁíÍâÒ»¸ö±äÁ¿µÄÃû³ÆÀ´²Ù×÷±äÁ¿£¬¾ÍÊÇ¿ÉÒÔ±äÁ¿¡£
¡¾Ê¾Àý¡¿
Îı¾²é¿´¸´ÖÆ´úÂë´òÓ¡¹ØÓÚ
<?php
$a = 'hello'; //ÆÕͨ±äÁ¿
$$a = ' ......
PHP³£Á¿
³£Á¿Êǹ̶¨µÄÊýÖµÀýÈçÔ²ÖÜÂÊ£¬ÓÃÒ»¸ö¼òµ¥µÄ±êʶ·û½øÐж¨Ò壨Ãû×Ö£©¡£³£Á¿Ä¬ÈÏΪ´óСдÃô¸Ð¡£°´ÕÕ¹ßÀý³£Á¿±êʶ·û×ÜÊÇ´óдµÄ¡£
³£Á¿ÃûºÍÆäËüÈκΠPHP ±êÇ©×ñÑͬÑùµÄÃüÃû¹æÔò¡£ºÏ·¨µÄ³£Á¿ÃûÒÔ×Öĸ»òÏ»®Ïß¿ªÊ¼£¬ºóÃæ¸ú×ÅÈκÎ×Öĸ£¬Êý×Ö»òÏ»®Ïß¡£
³£Á¿µÄ¶¨Ò壺¿ÉÒÔÓà define( ) º¯ÊýÀ´¶¨Òå³£Á¿¡£Ò»¸ö³£Á¿Ò»µ©±»¶¨Ò ......