PHPÍⲿ±äÁ¿Óë»·¾³±äÁ¿
PHPÍⲿ±äÁ¿Óë»·¾³±äÁ¿
PHPµÄÌصãÖ®Ò»¾ÍÊÇ¿ÉÒÔÓüòµ¥µÄ·½Ê½´¦Àí±íµ¥Êý¾Ý£¬»ñÈ¡»·¾³±äÁ¿¡£ÔÚPHPÖУ¬ÕâЩÍⲿÊý¾Ý»ò±äÁ¿±£´æÔÚÒ»ÖÖÌØÊâµÄÈ«¾Ö±äÁ¿Êý×éÖС£
±íµ¥Êý¾Ý
$_GET£º»ñÈ¡GETÇëÇó·¢Ë͵ÄÊý¾Ý
$_POST£º»ñÈ¡POSTÇëÇó·¢Ë͵ÄÊý¾Ý
$_REQUEST£º¿ÉÒÔͬʱ»ñÈ¡GETºÍPOSTÇëÇó·¢Ë͵ÄÊý¾Ý
¡¾Ê¾Àý¡¿
ÇëÇóURL£ºhttp://localhost/test.php?username=alex&pwd=365php
Îı¾²é¿´¸´ÖÆ´úÂë´òÓ¡¹ØÓÚ
<?php
//»ñÈ¡GETÇëÇóÊý¾Ý
echo $_GET['username']; //Êä³öalex
echo $_GET['pwd']; //Êä³ö365php
?>
<?php
//»ñÈ¡GETÇëÇóÊý¾Ý
echo $_GET['username']; //Êä³öalex
echo $_GET['pwd']; //Êä³ö365php
?>
¡¾Ê¾Àý¡¿
Îı¾²é¿´¸´ÖÆ´úÂë´òÓ¡¹ØÓÚ
<form method="POST">
Óû§Ãû£º<input type="text" name="uname" /><br />
ÃÜÂ룺<input type="text" name="pwd" /><br />
<input type="submit" value="怬" />
</form>
<?php
echo $_POST["uname"]; //Êä³öÓû§ÔÚ±íµ¥ÉÏÊäÈëµÄÓû§Ãû
echo $_POST["pwd"]; //Êä³öÓû§ÔÚ±íµ¥ÉÏÊäÈëµÄÃÜÂë
echo $_REQUEST["uname"]; //$_REQUESTÒ²¿ÉÒÔ»ñÈ¡µ½POSTÊý¾Ý
print_r($_REQUEST);
?>
<form method="POST">
Óû§Ãû£º<input type="text" name="uname" /><br />
ÃÜÂ룺<input type="text" name="pwd" /><br />
<input type="submit" value="怬" />
</form>
<?php
echo $_POST["uname"]; //Êä³öÓû§ÔÚ±íµ¥ÉÏÊäÈëµÄÓû§Ãû
echo $_POST["pwd"]; //Êä³öÓû§ÔÚ±íµ¥ÉÏÊäÈëµÄÃÜÂë
echo $_REQUEST["uname"]; //$_REQUESTÒ²¿ÉÒÔ»ñÈ¡µ½POSTÊý¾Ý
print_r($_REQUEST);
?>
»·¾³±äÁ¿
$_ENV
$_SERVER
°üº¬ÁËWeb·þÎñÆ÷µÄһЩÅäÖÃÐÅÏ¢£¬ÒÔ¼°ä¯ÀÀÆ÷µÄһЩ״̬ÐÅÏ¢£¬Ê¹Óú¯Êýphpinfo()¿ÉÒÔ·µ»Ø¸ü¶àµÄ»·¾³ÐÅÏ¢£¬ÆäÖаüº¬ÁË$_ENVºÍ$_SERVERµÄÄÚÈÝ¡£
$_ENV°üº¬£º
[TEMP] =&
Ïà¹ØÎĵµ£º
Blogϵͳ×÷Ϊ´ó¼Ò×î³£½Ó´¥µÄ»¥ÁªÍø¶«¶«£¬ÔÚÕ¾³¤ÈºÌåÖм¸ºõÈËÊÖÒ»²©£¬´ÓÖªÃûÃÅ»§µÄ²©¿ÍƵµÀ£¬µ½ÍøÂçÓªÏúר¼Ò²©¿Í£¬ÍøÃñ¶Ô²©¿ÍµÄ¹Ø×¢¶ÈÔÚ²»¶ÏÌá¸ß²¢É¡£Ä¿Ç°ÍøÉÏÃâ·ÑµÄblogϵͳ̫ÔÓ£¬ÔÚ´ËÕûÀíPHP°æµÄBlog½éÉÜÈçÏ£º
1¡¢wordpress:http://www.wordpress.org ¹¦ÄÜÒ²ºÜÈ«Ã棬Ӧ¸ÃÊÇÖ§³ÖblogµÄÊ×Ñ¡¡£ËüÓÐ×îÇ¿µÄÄ£°æ¹¦ÄÜ£¬ÒѾ ......
<?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( ......
1. DEDE £ÕâÊÇÒ»¿î¹úÄÚ¿ªÔ´µÄcms£¬×÷ÕßÊÇÒ»¸ö¸öÈË£¬ÄÜ×ö³öÈç´Ë¹¦ÄܵÄcms£¬ÊÇÏ൱²»´íµÄ¡£2007°æ¹¦ÄÜÊ®·ÖÇ¿´ó£¬Ï£ÍûÄܸÄÉÆ֮ǰÊý¾ÝÁ¿Ò»´ó£¬¸üо²Ì¬Ò³¾ÍºÜÂýµÄȱµã¡£ÒòΪ¿ªÔ´£¬Óн϶àµÄÍæ¼ÒºÍÓµ»¤Õß¡£·Ç³£ÊʺÏÓÐÒ»¶¨±à³Ì»ù´¡µÄÕ¾³¤¡£
¹Ù·½£ºhttp://www.dedecms.com
2. phpcms£Ò»¸ö×ۺϵÄÍøÕ¾¹ÜÀíϵͳ£¬ ......
Õ⼸Ì죬ÎÒÔÚѧϰPHPÓïÑÔÖеÄSPL
¡£
Õâ¸ö¶«Î÷Ó¦¸ÃÊôÓÚPHPÖеĸ߼¶ÄÚÈÝ£¬¿´ÉÏÈ¥ºÜ¸´ÔÓ£¬µ«ÊǷdz£ÓÐÓã¬ËùÒÔÎÒ×öÁ˳¤Æª±Ê¼Ç¡£²»È»¼Ç²»×¡£¬ÒÔºóÒªÓõÄʱºò£¬»¹ÊÇÒª´ÓͷѧÆð¡£
ÓÉÓÚÕâÊǹ©×Ô¼º²Î¿¼µÄ±Ê¼Ç£¬²»Êǽ̳̣¬ËùÒÔдµÃ±È½Ï¼òµ¥£¬Ã»Óжà½âÊÍ¡£µ«ÊÇÎÒÏ룬Èç¹ûÄãÊÇÒ»¸öÊìÁ·µÄPHP5³ÌÐòÔ±£¬Ó¦¸Ã×ãÒÔ¿´¶®ÏÂÃæµÄ²ÄÁÏ£¬¶øÇÒ» ......
PHP±í´ïʽ
±í´ïʽÊdz£Á¿¡¢±äÁ¿ºÍÔËËã·ûµÄ×éºÏ
±í´ïʽÊÇPHPÖеÄÖØÒªÄÚÈÝ£¬PHPÖм¸ºõËùÓеĶ«Î÷¶¼¿ÉÒÔ³ÆΪ±í´ïʽ
$x=10;
$y=($x=10);
$y+=($x=10);
$z=&$x;
$condition?$true_item:$false_item;
PHPÔËËã·û
ÔËËã·ûÊÇÓÃÀ´¶ÔÊýÖµ»ò±äÁ¿½øÐÐijÖÖ²Ù×÷ÔËËãµÄ·ûºÅ¡£Ò»°ãµØ˵£¬ÔËËã·û¿ÉÒÔ´øÓÐ1¸ö¡¢2¸ö»òÕ߸ü¶à¸öÔËË ......