09Äê5ÔÂ11ºÅ×îÐÂPHPÃæÊÔÌâ
һѡÔñÌ⣺
1.ÏÂÃæµÄÄǸöÑ¡Ïî¿ÉÒÔ»ñÈ¡±íµ¥Ìá½»µÄÖµ£¿£¨¶àÑ¡£© b d
<form name='frm1' method="post">
<input type="text" name="name" ><input type="submit" name="a">
</form>
A.$_GET['name']
B.$_POST['name']
C.$_SESSION['name']
D.$_REQUEST['name']
E.$_GLOBAL['name']
2.ÍüÀ²¡£²»¹ýÒ²ÊǼòµ¥Ìâ
3.ÏÂÃæµÄÀý×ÓÔËÐеĽá¹ûΪ? c
<?php
ob_start();
for ($i=0; $i<10; $i++) {
echo $i;
}
ob_end_flush();
$output=ob_get_contents();
echo $output;
ob_clean();
?>
A.12345678910
B.01234567890123456789
C.0123456789
D.ûÓÐÊä³ö
£¨µãÆÀ£ºÕâ3СÌâÖ÷ÒªÊÇ¿¼²ìÄãµÄ»ù´¡Ê²Ã´Ñù£©
¶þ£®1.¼ÙÉèÓиöѧÉú±íPERSON£¬ÈçÏÂͼ¡£ÒªÇóÓÃPHP°ÑÊý¾ÝÈ«²¿²é³öÀ´£¬²¢ÏÔʾ£»
ID
name
yuwen
shuxue
1
ÕÅÈý
88
47
2
ÀîËÄ
98
78
3
С»Æ
78
69
//¼ÙÉèÒѾÁ¬ÉÏÊý¾Ý¿â
$sql = "select * from PERSON";
$db = new db;
$rs = $db->mysql_query($sql);
$rows = mysql_fetch_array($rs);
If($rows){
Print_r($rows);
}
£¨µãÆÀ£ºÖ÷ÒªÊÇ¿¼²ìÄãµÄ¶ÔSQLµÄˮƽ£©
2.ÓÃÕýÔò±í´ïʽƥÅäÓÊÏäºÍURL£¬¸ñʽÈçÏÂ:
ÓÊÏ䣺[url=mailto:examples@examples.com.cn]examples@examples.com.cn[/url]
URL: www.examples.com.cn/test.php?id=23
£¨Ìáʾ£ºÓÃpreg_*ϵÁÐÀ´ÊµÏÖ£©
´ð£º1.ÓÊÏä:
$email = "[url=mailto:examples@examples.com.cn]examples@examples.com.cn[/url]";
preg_match("^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/is
",$email,$arr)
^([a-zA-Z0-9_-])+@([]a-zA-Z0-9_-)+(\.[a-zA-Z0-9_-])+
2.URL;
$url ="www.examples.com.cn/test.php?id=23";
Preg_match("/^http(s)?:\/\/(\[\w-\]+\.)+\[\w-\]+(\/\[\w- .\/?%&=\]*)$/is",$url);
µãÆÀ:Ö÷ÒªÊÇÏ뿼²ìÒ»ÏÂÄãÊÇ·ñÖªµÀÕýÔò±í´ïʽµÄ£¬ÄÜ´ó¸Åд³öÀ´Ò²ÄÜPASSÁË
Èý£®1.˵³öXHTMLºÍHTMLÁ½¸öÖ®¼äÁ½¸öÒÔÉÏ×îÃ÷ÏÔµÄÇø±ð£¿
1.xhtmlÑϸñÇø·Ö´óСд£¬htmlÔò²»ÐèÒª
2.XhtmlÖÐÔªËØµÄǶÌײ»Äܽ»´í£¬htmlÔò²»ÐèÒª
3.XhtmlÖÐËùÓеķǿÕÔªËØ±ØÐëÓйرձê¼Ç£¬htmlÔò²»ÐèÒª
4.XhtmlÖе¥¶À±ê¼Ç£¬±ØÐëÓйرշû¡£ÀýÈç<br />£¬htmlÔò²»ÐèÒª
5.XhtmlÖÐÊôÐÔÖµ±ØÐë¼ÓÒýºÅ£¬¼´ÊÇËûÊÇÊý×Ö£¬htmlÔò²»ÐèÒª¡£
£¨µãÆÀ£ºÖ÷ÒªÊÇ¿¼²ìÄãµÄ»ù´¡Ê²Ã´Ñù£¬¶ÔXMLÊÇ·ñÁ˽⣩
2.ÓÃJAVASCRIPTʵÏÖ³ö3¸öImage¶ÔÏó(Ìáʾ£º¶Ô
Ïà¹ØÎĵµ£º
php°æ£º
<?php
$cookie_file = fopen('cookie.txt','w');//dirname(__FILE__)."/cookie_".md5(basename(__FILE__)).".txt"; // ÉèÖÃCookieÎļþ±£´æÂ·¾¶¼°ÎļþÃû
function vlogin($url,$data){ // Ä£ÄâµÇ¼»ñÈ¡Cookieº¯Êý
$curl = curl_init(); // Æô¶¯Ò»¸öCURL»á»°
curl_setopt($cur ......
Ïà¹Ø²ÎÊý£º<textarea name=content>
Ä£°åµ÷Ó÷û£º$
¡¡¡¡Ìá½»ÐÂ±íµ¥µÄʱºòÓÃÈçÏ´úÂ룬½á¹ûÍêÈ«Õý³££º
<form name="frm_HelpMessageAdd" id="frm_HelpMessageAdd" action="manage.php" method="POST" enctype="multipart/form-data">
<input name="content" type="hidden" id="shopProduct_Intro"& ......
´úÂëÈçÏÂ,javascript:alert(document.cookie=”adminuser=”+escape(”admin”));javascript:alert(document.cookie=”adminpass=”+escape(”admin”));javascript:alert(document.cookie=”admindj=”+escape(”1″));
´ÓÕâ¾ä´úÂë¿ÉÒÔ¿´³ö£¬¾ÍÊÇÀûÓÃÁËcook ......
×¢£ºÕâÊÇ´ÓPHPCMS¿ª·¢ÎĵµÀï¿´µ½±àÂë¹æ·¶£¬ËäÃûΪPHPCMSµÄ¿ª·¢¹æ·¶£¬µ«ÎÒ¾õµÃËùÓеÄPHP±à³Ì¶¼¸ÃÈç´Ë¡£Ð´ÁËÄÇô¶àPHP£¬ºÜ¶à±àÂë¶ÔÕÕÕâ¹æ·¶¶¼¸Ð¾õǷȱºÜ¶à£¬½ñºóÒ»¶¨Òª¶ÔÕÕ¾ÀÕý¡£
Phpcms ±àÂë¹æ·¶
1. ÒýÑÔ…. 2
2. ÊÊÓ÷¶Î§…. 2
3. ±ê×¼»¯µÄÖØÒªÐԺͺô¦…. 3
4. PHP±àÂë¹æ·¶ÓëÔÔò…. ......
ÒÔϹØÓڴ˺¯Êý¸÷ÏîʹÓòÎÊý:
bool curl_setopt (int ch, string option, mixed value)
curl_setopt()º¯Êý½«ÎªÒ»¸öCURL»á»°ÉèÖÃÑ¡Ïî¡£option²ÎÊýÊÇÄãÏëÒªµÄÉèÖã¬valueÊÇÕâ¸öÑ¡Ïî¸ø¶¨µÄÖµ¡£
ÏÂÁÐÑ¡ÏîµÄÖµ½«±»×÷Ϊ³¤ÕûÐÎʹÓÃ(ÔÚoption²ÎÊýÖÐÖ¸¶¨)£º
CURLOPT_INFILESIZE
: µ±ÄãÉÏ´«Ò»¸öÎļþµ½Ô¶³ÌÕ¾µã£¬Õâ¸öÑ¡Ï ......