Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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>";
}


Ïà¹ØÎĵµ£º

linuxÏ¿ìËÙ°²×°apache+php+mysql

 £¨1£©¡¢yum°²×°mysql
//yum°²×°
yum -y install mysql mysql_server
//ÔÚ·þÎñÇåµ¥ÖÐÌí¼Ómysql·þÎñ
chkconfig --add mysqld
//·þÎñÆô¶¯
service mysqld start
//³õʼ»¯mysqlÊý¾Ý¿â
/usr/bin/mysql_secure_installation
£¨2£©¡¢°²×°apache
yum -y install httpd
service httpd start
Ìí¼ÓiptablesÔÊÐí·Ã ......

PHPÓëCURL

openpne¿ªÔ´SNS
ÓÃPHPÄ£Äâ126ÓÊÏäµÄµÇ½¹ý³ÌÀ´ÊÕÈ¡Óʼþ:http://www.cnblogs.com/amboyna/archive/2009/04/29/1446487.html
phpµ÷ÓÃÆäËûϵͳµÄ½Ó¿ÚÕûÀí:http://blog.chinaunix.net/u2/84280/showart_2065156.html
ÎÊÌ⣺ÎÒÊÇÏëдһ¸öÍøÉϸøÊÖ»ú·¢¶ÌÐŵŦÄÜ µ÷ÓÃÁËÒ»¸öµÚÈý·½µÄ·ÉÐŽӿÚ
·ÉÐŽӿÚPHP°æ (Ãâ·Ñ·¢¶ÌÐÅ) v1. ......

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."´Î·ÃÎʱ¾Ò³ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ