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] =&
Ïà¹ØÎĵµ£º
½øÐÐÎļþµÄ¶ÁºÍд£¬ÏÈ´ò¿ªÒ»¸öÎļþ£¬È»ºó¿ªÊ¼¶Á»òÕßдÎļþ£¬×îºóÔÙ¹ØϵÕâ¸öÎļþ×ÊÔ´¡£
È磬ÎļþµÄ¶Á²Ù×÷£º
<?php
$file = fopen('your file path','r');
while(!feof($file)){ //µ±Ã»ÓжÁÈ¡µ½Îļþ½á⣬¼ÌÐøÑ»·¶ÁÈ¡²Ù×÷
$line = fgets($file); //¶ÁÈ¡µ½Ò»ÐеÄÄÚÈÝ
echo $line.'<br/>';
}
fclose($file) ......
phpÎļþ
<?php
mysql_connect("localhost","","");
mysql_query("set names 'gb2312'");
mysql_select_db("shop");
$sqlstr="select * from goods";
require 'smarty/libs/Smarty.class.php';
$smarty = new Smarty;//ÉèÖø÷¸öĿ¼µÄ·¾¶£¬ÕâÀïÊÇ°²×°µÄÖصã
$smarty->template_dir ="smarty/templates/templa ......
ÒýÓÃhttp://www.icnote.com/Mysql-php-connector/
ÓÉÓÚ¹«Ë¾µÄ·þÎñÆ÷¿ªÊ¼Ö»ÊÇÓÃÓÚjavaµÄÖ§³Ö£¬×°ÁËapache£¬mysql£¬php£¬µ«ÊÇphpµÄ°²×°Ã»ÓжÔmysql½øÐÐÖ§³Ö£¬½ñÌì¶ÔËû½øÐÐÁËÀ©Õ¹£¬¼Ç¼ÈçÏ¡£
Ê×ÏÈ£¬°²×°mysqlºÍphpµÄÁ¬½ÓÀ©Õ¹£¬ÐèÒªÒÔÏ°ü¡£¿ÉÒÔÔÚhttp://rpmfind.net/
ÕÒµ½£¬¸ù ......
1. DEDE £ÕâÊÇÒ»¿î¹úÄÚ¿ªÔ´µÄcms£¬×÷ÕßÊÇÒ»¸ö¸öÈË£¬ÄÜ×ö³öÈç´Ë¹¦ÄܵÄcms£¬ÊÇÏ൱²»´íµÄ¡£2007°æ¹¦ÄÜÊ®·ÖÇ¿´ó£¬Ï£ÍûÄܸÄÉÆ֮ǰÊý¾ÝÁ¿Ò»´ó£¬¸üо²Ì¬Ò³¾ÍºÜÂýµÄȱµã¡£ÒòΪ¿ªÔ´£¬Óн϶àµÄÍæ¼ÒºÍÓµ»¤Õß¡£·Ç³£ÊʺÏÓÐÒ»¶¨±à³Ì»ù´¡µÄÕ¾³¤¡£
¹Ù·½£ºhttp://www.dedecms.com
2. phpcms£Ò»¸ö×ۺϵÄÍøÕ¾¹ÜÀíϵͳ£¬ ......
Õ⼸Ì죬ÎÒÔÚѧϰPHPÓïÑÔÖеÄSPL
¡£
Õâ¸ö¶«Î÷Ó¦¸ÃÊôÓÚPHPÖеĸ߼¶ÄÚÈÝ£¬¿´ÉÏÈ¥ºÜ¸´ÔÓ£¬µ«ÊǷdz£ÓÐÓã¬ËùÒÔÎÒ×öÁ˳¤Æª±Ê¼Ç¡£²»È»¼Ç²»×¡£¬ÒÔºóÒªÓõÄʱºò£¬»¹ÊÇÒª´ÓͷѧÆð¡£
ÓÉÓÚÕâÊǹ©×Ô¼º²Î¿¼µÄ±Ê¼Ç£¬²»Êǽ̳̣¬ËùÒÔдµÃ±È½Ï¼òµ¥£¬Ã»Óжà½âÊÍ¡£µ«ÊÇÎÒÏ룬Èç¹ûÄãÊÇÒ»¸öÊìÁ·µÄPHP5³ÌÐòÔ±£¬Ó¦¸Ã×ãÒÔ¿´¶®ÏÂÃæµÄ²ÄÁÏ£¬¶øÇÒ» ......