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 °æ±¾¸÷Ò죬ÒѾֹͣÉý¼¶¿ª·¢µÄÓÐ 4.0 ϵÁÐµÄ 4.4.x£¬µ«ÏÖÔÚ»¹Óв¿·ÖÉú²ú»·¾³ÔÚÅÜÕâ¸ö°æ±¾£¬ÐèÒª¼ÌÐøά»¤´úÂë¡£PHP 5.0 ϵÁÐÊÇÏÖÔÚ¿ª·¢ºÍÓ¦ÓõÄÖ÷Á÷°æ±¾£¬ÓÐ 5.1.x ºÍ 5.2.x ϵÁС£PHP 6.0 Ä¿Ç°»¹ÊÇÊÔÓð汾£¬Óà PHP ¿ª·¢Èí¼þ²úÆ·µÄÈËÏÖÔÚ¿ÉÒÔÔ¤ÏÈ×÷¼æÈÝÐÔ²âÊÔ¡£
PHP Ö§³ÖµÄÊý¾Ý ......
Ò»¡¢µÇ½
1.½øÈëlinux
2.̞: root
3.¿ÚÁî:123456
4.mysql Óû§Ãû root ÃÜÂë 123456
¶þ¡¢Æô¶¯mysqlÓëapache·þÎñ
1.Æô¶¯mysqÊý¾Ý¿â:/usr/local/mysql/bin/./mysqld_safe --user=mysql &
2.Í£Ö¹mysqlÊý¾Ý¿â:/usr/local/mysql/bin/mysqladmin -u root -p shutdown
3.Æô¶¯apache: /usr/local/apache2/bin/./ap ......
class lamp
{
public function __construct()
{
}
public function __get($var) //»ñÈ¡²»´æÔÚµÄÊôÐÔʱµ÷ÓÃ
{
echo "²»´æÔÚ±äÁ¿$var<br>";
}
public function __set($var ......
PHP±í´ïʽ
±í´ïʽÊdz£Á¿¡¢±äÁ¿ºÍÔËËã·ûµÄ×éºÏ
±í´ïʽÊÇPHPÖеÄÖØÒªÄÚÈÝ£¬PHPÖм¸ºõËùÓеĶ«Î÷¶¼¿ÉÒÔ³ÆΪ±í´ïʽ
$x=10;
$y=($x=10);
$y+=($x=10);
$z=&$x;
$condition?$true_item:$false_item;
PHPÔËËã·û
ÔËËã·ûÊÇÓÃÀ´¶ÔÊýÖµ»ò±äÁ¿½øÐÐijÖÖ²Ù×÷ÔËËãµÄ·ûºÅ¡£Ò»°ãµØ˵£¬ÔËËã·û¿ÉÒÔ´øÓÐ1¸ö¡¢2¸ö»òÕ߸ü¶à¸öÔËË ......
PHPµÄÓï·¨½á¹¹
±à³ÌÓïÑÔµÄÓï·¨½á¹¹£¨lexical structure£©ÊÇÖ¸¹ÜÀíÈçºÎÓÃÓïÑÔд³ÌÐòµÄ»ù±¾¹æÔòµÄ¼¯ºÏ¡£Óï·¨½á¹¹ÊÇ×îµÍ¼¶µÄÓïÑÔÓï·¨£¬²¢ÇÒÖƶ¨Á˱äÁ¿Ãû³ÆÊÇʲôÑù×Ó£¬Ê²Ã´×Ö·ûͨ³£ÓÃ×ö×¢ÊÍ£¬ÒÔ¼°ÈçºÎ½«³ÌÐòÓï¾ä·Ö¿ªµÈµÈ¡£
PHPµÄ»ù±¾Óï·¨
1¡¢ ´óСд
ͬÄÚÖýṹºÍ¹Ø¼ü×Ö£¨Èçecho¡¢while¡¢classµÈ£©Ò»Ñù£¬Óû§×Ô¶¨ÒåµÄÀàÃû ......