PHPÔÓ¼Ç
preg_replace -- Ö´ÐÐÕýÔò±í´ïʽµÄËÑË÷ºÍÌæ»»
array_push -- ½«Ò»¸ö»ò¶à¸öµ¥ÔªÑ¹ÈëÊý×éµÄĩ⣨ÈëÕ»£©
preg_match -- ½øÐÐÕýÔò±í´ïʽƥÅä
exif_imagetype($file) ---ͼÏñÀàÐÍ£»
echo "<SCRIPT LANGUAGE='JavaScript'>alert('µÃµ½');history.back();</SCRIPT>";
exit;
date_default_timezone_set('PRC'); ±±¾©Ê±¼ä£»
bool file_exists ( string filename)
Èç¹ûÓÉ filename Ö¸¶¨µÄÎļþ»òĿ¼´æÔÚÔò·µ»Ø TRUE£¬·ñÔò·µ»Ø FALSE¡£
<?php
$text = "\t\tThese are a few words :) ... ";
echo trim($text); // "These are a few words :) ..."
echo trim($text, " \t."); // "These are a few words :)"
// trim the ASCII control characters at the beginning and end of $binary
// (from 0 to 31 inclusive)
$clean = trim($binary, "\x00..\x1F");
?>
mysql À©Õ¹
<?php if(extension_loaded('mysql')?>
bool is_writable ( string filename)
is_writable -- Åжϸø¶¨µÄÎļþÃûÊÇ·ñ¿Éд
array_values() ·µ»Ø input Êý×éÖÐËùÓеÄÖµ²¢¸øÆ佨Á¢Êý×ÖË÷Òý
$_GETÊý×éÖд«µÝµÄÊÇͨ¹ýurl´«µÝµÄÖµ£¬pageÊÇÊý×éµÄϱê
ÀýÈ磺
http://www.xx.cn/index.php?id=1&page=5
ÄÇô´«µÝ¹ýÀ´µÄ$_GETÊý×éÖÐ
$_GET['id']=1
$_GET['page']=5
globalÊÇÈ«¾Öº¯Êý
$_POST£¬$_GET,ÕâÁ½¸öº¯ÊýÊÇÌá½»±íµ¥Ê±ºòÓõ½
Ö»ÊÇ$_GETÌá½»µÄ¶«Î÷»áÏÔʾÔÚURLÖУ¬¶øÇÒ»áÓÐ×Ö½ÚÏÞÖÆ
$_POSTÌá½»µÄ¶«Î÷²»»áÏÔʾÔÚURLÖУ¬±È½Ï°²È«
section ¼ò½é
section:
sectionµÄ²úÉúÊÇΪ½â¾öforeachµÄ²»×ãµÄ£¬ÓëforeachÒ»Ñù£¬ËüÓÃÓÚÉè¼ÆÄ£°åÄÚµÄÑ»·¿é£¬Ëü½ÏΪ¸´ÔÓ£¬¿É¼«´ó³ÌÐòÉÏÂú×ã³ÌÐòÐèÒª£¬ËùÒÔÔÚ³ÌÐòÖÐÎÒÏ°¹ßʹÓÃËü¶ø²»Ê¹ÓÃforeach,»ù±¾ÔÐÎΪ£º
{section name = name loop = $varName[, start = $start, step = $step, max = $max, show = true]}
name: sectionµÄÃû³Æ£¬²»ÓüÓ$
$loop: Ҫѻ·µÄ±äÁ¿£¬ÔÚ³ÌÐòÖÐҪʹÓÃassign¶ÔÕâ¸ö±äÁ¿½øÐвÙ×÷¡£
$start: ¿ªÊ¼Ñ»·µÄϱ꣬ѻ·Ï±êĬÈÏÓÉ0¿ªÊ¼
$step: ÿ´ÎÑ»·Ê±Ï±êµÄÔöÊý
$max: ×î´óÑ»·Ï±ê
$show: booleanÀàÐÍ£¬¾ö¶¨ÊÇ·ñ¶ÔÕâ¸ö¿é½øÐÐÏÔʾ£¬Ä¬ÈÏΪtrue
ÕâÀïÓиöÃû´ÊÐèҪ˵Ã÷£º
Ñ»·Ï±꣺ʵ¼ÊËüµÄÓ¢ÎÄÃû³ÆΪindex£¬ÊÇË÷Òýµ
Ïà¹ØÎĵµ£º
½ñÌìÔÚ¼ÒÀïÖØа²×°ÁËÒ»ÏÂPHP µ±ÈÃÒ²ÓÐApacheÁË¡£µ«ÊÇÎÒÓöµ½ÁËÒ»¸öÎÊÌ⣬¾ÍÊÇApache·þÎñÎÞ·¨¿ªÆô£¬ºó¹ûÔõÑùÎÒÏëºÜ¶àÈ˶¼ÊÇÖªµÀµÄ£¬µ±Ê±Ò²Ã»ÓжàÏ룬ÒÔΪÊÇ×Ô¼º°²×°µÄʱºò³öÏÖÁËʧÎó¾ÍÖØа²×°Ò»±é£¬¿ÉÊÇ»¹ÊÇÒ»ÑùÎÞ·¨´ò¿ª£¬È»ºóÎÒ¾ÍÔÚÏëÊÇʲôÎÊÌ⣬¶Ë¿ÚºÅ80.ÎҲ鿴ÁËһϣ¬·¢ÏÖûÓдíÎó°¡£¬Ë¼¿¼Á˺ܾ㬶ÔÍøÂçÒÔ¼°·À» ......
×î½üÔÚCSDN¸Õ¿ªÁËÕâ¸ö²©¿Í£¬Ã»Ê²Ã´Ê±¼ä°ÑÒÔǰдµÄÎÄÕ°á¹ýÀ´£¬Ö»ÄÜÓпÕÂýÂýÀ´ÁË¡£
--------------------------ÕâƪÎÄÕ½öÏ׸øÄÇЩһֱÔÚPHPÂÒÂëÎÊÌâÉÏÀ§»óµÄÈË¡£
A.Ê×ÏÈ˵ÏÂHTMLÖÐÎÄÂÒÂëÎÊÌâµÄ½â¾ö·½·¨¡£
±ÈÈçÓиöindex.htmlµÄÒ³Ã棨ÕâÀïÊÇÖ¸ÕæÕýµÄ¾²Ì¬Ò³Ã棬Ð޸ķþÎñÆ÷µÄ……α¾²Ì¬µÄÇë¿´·½°¸B£©
1. ......
×î¼òµ¥µÄ˶¼»áµÄµ÷ÊÔ(ÊÇô?):
±¾À´°²×°phpÊÇûÎÊÌâ Ò²ÄÜÓÃÁË µ«ÊÇÓÖ´ÓÊéÉϳÁËһЩ´úÂëÀ´·¢ÏÖ²»ÄÜÓÃ, ÄǾÍÓÃÑÛ¾¦×ÐϸµÄ¶Ô×ÅÊé±¾¾ÀÕýһϴúÂë¹þ ¿Ï¶¨ÊÇÄã³´íÁË ÒªÃ´ÊÇÓ¡Ë¢´íÁË
±ÈÈç 1(yi)¸úl(el) 0(ling)¸úO(´óдo)µÈ
±ðЦ¹þ ÕæµÄÓÐÈ˳´í¹ý »¹ÈÃÎÒ¹ýÈ¥°ïæµ÷ÊÔ ¹ýÈ¥ÎÒ¼Èë½øÈ¥(ËûµÄû±£´æ) ¾ÍÈ«¶ÔÁË
ÑÔ¹éÕý´«
Q: "Ϊ ......
function redirect($url, $msg)
{
echo $msg."</br>\n";
echo "<a href=\"".$url."\">Èç¹ûûÓÐÌøת£¬ÇëµãÕâÀïÌøת</a>\n";
echo "<script language=\"javascript\">se ......
1.PHP±à³ÌÄÜÁ¦
2.MysqlÄÜÁ¦
A.Á˽⣺֪µÀʹÓÃPHPÁ´½ÓÊý¾Ý¿â£»¶®µÃһЩ¼òµ¥µÄSQL;½¨Á¢Ò»Ð©¼òµ¥µÄË÷Òý£»¶®µÃÓù¤¾ß¼òµ¥²Ù×÷Ò»ÏÂÊý¾Ý¿â£¨Ôöɾ¸Ä²éÊý¾Ý±í½á¹¹£©¡£
B.ÊìϤ£º¶®µÃÔÚ¿ª·¢Ó¦ÓÃÉÏÉè¼ÆÊý¾Ý¿â£¬½¨Á¢Ò»Ð©ÓÐЧµÄË÷Òý£¬ÓÃexplain·ÖÎöSQLÐÔÄÜ£¬Ñ¹Á¦²âÊԵȵȡ£
C.ºÜÊìϤ£ºÉîÈëÁ˽âÊý¾Ý¿âË÷Òý£¬´æ´¢ÒýÇæÔÀíÒÔ¼°ÔËÐлúÖÆ£ ......