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
Ïà¹ØÎĵµ£º
<?php
// Á¬½Ó£¬Ñ¡ÔñÊý¾Ý¿â
$dbconn = pg_connect("host=localhost dbname=publishing user=www password=foo")
or die('Could not connect: ' . pg_last_error());
// Ö´ÐÐ SQL ²éѯ
$query = 'SELECT * from authors';
$result = pg_query($query) or die('Query failed: ' . pg_last_error( ......
PHP±í´ïʽ
±í´ïʽÊdz£Á¿¡¢±äÁ¿ºÍÔËËã·ûµÄ×éºÏ
±í´ïʽÊÇPHPÖеÄÖØÒªÄÚÈÝ£¬PHPÖм¸ºõËùÓеĶ«Î÷¶¼¿ÉÒÔ³ÆÎª±í´ïʽ
$x=10;
$y=($x=10);
$y+=($x=10);
$z=&$x;
$condition?$true_item:$false_item;
PHPÔËËã·û
ÔËËã·ûÊÇÓÃÀ´¶ÔÊýÖµ»ò±äÁ¿½øÐÐijÖÖ²Ù×÷ÔËËãµÄ·ûºÅ¡£Ò»°ãµØËµ£¬ÔËËã·û¿ÉÒÔ´øÓÐ1¸ö¡¢2¸ö»òÕ߸ü¶à¸öÔËË ......
PHPÊý¾ÝÀàÐÍ£¬ÓаËÖÖÔʼÀàÐÍ
ËÄÖÖ±êÁ¿ÀàÐÍ
²¼¶ûÐÍ£¨boolean£©
ÕûÐΣ¨integer£©
¸¡µãÐÍ£¨fload¡¢Ò²×ödouble£©
×Ö·û´®£¨string£©
Á½ÖÖ¸´ºÏÀàÐÍ
Êý×飨array£©
¶ÔÏó£¨object£©
Á½ÖÖÌØÊâÀàÐÍ
×ÊÔ´£¨resource£©
NULL
PHPÊÇÒ»ÖÖÈõÀàÐÍÓïÑÔ£¬ÔÚ´ó¶àÊý±à³ÌÓïÑÔÖУ¬±äÁ¿Ö»Äܱ£³ÖÒ»ÖÖÀàÐ͵ÄÊý¾Ý£¬¶øÇÒÕâ¸öÀàÐ ......
PHP³£Á¿
³£Á¿Êǹ̶¨µÄÊýÖµÀýÈçÔ²ÖÜÂÊ£¬ÓÃÒ»¸ö¼òµ¥µÄ±êʶ·û½øÐж¨Ò壨Ãû×Ö£©¡£³£Á¿Ä¬ÈÏΪ´óСдÃô¸Ð¡£°´ÕÕ¹ßÀý³£Á¿±êʶ·û×ÜÊÇ´óдµÄ¡£
³£Á¿ÃûºÍÆäËüÈκΠPHP ±êÇ©×ñÑͬÑùµÄÃüÃû¹æÔò¡£ºÏ·¨µÄ³£Á¿ÃûÒÔ×Öĸ»òÏ»®Ïß¿ªÊ¼£¬ºóÃæ¸ú×ÅÈκÎ×Öĸ£¬Êý×Ö»òÏ»®Ïß¡£
³£Á¿µÄ¶¨Ò壺¿ÉÒÔÓà define( ) º¯ÊýÀ´¶¨Òå³£Á¿¡£Ò»¸ö³£Á¿Ò»µ©±»¶¨Ò ......