Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

PHPÁ¬½ÓMysqL

Á¬½Ó£º
$conn=mysql_connect ("localhost:3306", "username", "password");
mysql_select_db("DBname");
¶Á£º
$exec="select * from stu";
$result=mysql_query($exec);
while($rs=mysql_fetch_object($result))
{
    echo $rs->id." ".$rs->name." ".$rs->age." ".$rs->sex;
    echo "<br>";
}


Ïà¹ØÎĵµ£º

phpѧϰ±Ê¼Ç

 1¡¢$_SERVER['SCRIPT_NAME']¡¢$_SERVER['PHP_SELF']ºÍ$_SERVER['REQUEST_URI']Çø±ð
Àý×Ó:http://localhost/phpwind75/test.php/%22%3E%3Cscript%3Ealert(’xss’)%3C/script%3E%3Cfoo
$_SERVER['SCRIPT_NAME']Ö»»ñÈ¡½Å±¾Ãû£¬²»»ñÈ¡²ÎÊý,Êä³ö½á¹ûΪ:test.php;
$_SERVER['PHP_SELF']»ñÈ¡½Å±¾Ãûºó£¬Í¬Ê±»ñÈ ......

PHP¼òµ¥¼ÆÊýÆ÷

 <?php
/*ʹÓÃÎı¾Îļþ¼Ç¼Êý¾ÝµÄ¼òµ¥ÊµÏÖ*/
$counter=1;
if(file_exists("mycounter.txt")){
$fp=fopen("mycounter.txt","r");
$counter=fgets($fp,9);
$counter++;
fclose($fp);
}
$fp=fopen("mycounter.txt","w");
fputs($fp,$counter);
fclose($fp);
echo "<h1>ÄúÊǵÚ".$counter."´Î·ÃÎʱ¾Ò³ ......

php ͨ¹ýinclude·½Ê½ÊµÏÖ¹ú¼Ê»¯¶àÓïÑÔ(i18n)

includeʵÏÖ¹ú¼Ê»¯
½«index.php½øÐз­Òë:
IndexÄÚÈÝ
1.         Index
2.         About us
ÎÒÃÇ¿ÉÒÔ½«index.phpÉèÖÃΪһ¸ö·­ÒëÄ£°æ£¬ËùÓгöÏÖ×Ö·ûµÄµØ·½£¬¶¼¶¨ÒåΪ±äÁ¿£¬Èç1£¬2²¿·ÖÉèÖÃΪ·­ÒëµÄ±äÁ¿$menu_index, $menu_aboutus.
......

PHP Security for Deployers

PHP Security for Deployers
If you're a Developer
READ THIS and then work with your SysAdmins to step through any and all the layers of security designed to protect your apps.
Example:
Traffic must first pass through a SPI firewall (ensure that ONLY necessary ports/protocols are permitted; en ......

PHPÊý×éµÄʹÓúͱéÀú

 1¡¢Êý×éµÄÉêÇëºÍʹÓãº
$array=array(array(2,324,34)); 
echo   $array[0][1]; 
Ö±½ÓÉêÇëʹÓãº
$student[0][0]="ÎÒ";
$student[0][1]="ÊÇ";
$student[1][0]="Ë­";
$student[1][1]="ά";
 echo   $student[1][0];
2¡¢±éÀú£º ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ