ÀûÓÃphp»ñÈ¡Êý¾Ý¿âÖÐËùÓÐÐÅÏ¢¿É²Î¿¼phpMyAdmin
<?php
@mysql_connect("localhost", "root","1981427") //Ñ¡ÔñÊý¾Ý¿â֮ǰÐèÒªÏÈÁ¬½ÓÊý¾Ý¿â·þÎñÆ÷
or die("Êý¾Ý¿â·þÎñÆ÷Á¬½Óʧ°Ü");
$dbs = mysql_list_dbs(); //µ÷ÓÃmysql_list_dbsº¯Êý
while ($array = mysql_fetch_row($dbs)) //Ñ»·Êä³öËùÓеÄÊý¾Ý¿âÃû³Æ
{
echo "$array[0]<BR>";
}
?>
<?php
@mysql_connect("localhost", "root","1981427") //Ñ¡ÔñÊý¾Ý¿â֮ǰÐèÒªÏÈÁ¬½ÓÊý¾Ý¿â·þÎñÆ÷
or die("Êý¾Ý¿â·þÎñÆ÷Á¬½Óʧ°Ü");
$dbs = mysql_list_tables("test"); //µ÷ÓÃmysql_list_tablesº¯Êý
while ($array = mysql_fetch_row($dbs)) //Ñ»·Êä³öËùÓеıíÃû³Æ
{
echo "$array[0]<BR>";
}
?>
<?php
mysql_connect("localhost","root","1981427"); //Á¬½Ó·þÎñÆ÷
mysql_select_db("test"); //Ñ¡ÔñÊý¾Ý¿â
$result = mysql_query("SELECT * from tablename1"); //Ö´Ðвéѯ²Ù×÷
echo mysql_num_fields($result); //»ñÈ¡ÁеÄÊýÄ¿
?>
<?php
mysql_connect("localhost","root","1981427");
mysql_select_db("test");
$result = mysql_query("SELECT * from tablename1");
echo mysql_field_name($result,0); //»ñÈ¡ÁеÄÃû³Æ
?>
<?php
mysql_connect("localhost","root","1981427");
mysql_select_db("test");
$result = mysql_query("SELECT * from tablename1");
echo mysql_field_type($result,0); //»ñÈ¡ÁеÄÊý¾ÝÀàÐÍ
?>
<?php
mysql_connect("localhost","root","1981427");
mysql_select_db("test");
$result = mysql_query("SELECT * from tablename1");
echo mysql_field_len($result,0); //»ñÈ¡Áеij¤¶È
?>
<?php
mysql_connect("localhost","root","1981427");
mysql_select_db("test");
$result = mysql_query("SELECT * from tablename1");
echo mysql_field_flag($result,0); //»ñÈ¡ÁеıêÖ¾
?>
<?php
mysql_connect("localhost","root","1981427"); //Á¬½Ó·þÎñÆ÷
mysql_select_db("test"); //Ñ¡ÔñÊý¾Ý¿â
echo "<table border='1'>"; //Êä³ö±íÍ·
echo "<tr><th>ÁÐÃû</th><th>ÀàÐÍ</th><th>³¤¶È</th><th>±êÖ¾</th>";
$result = mysql_query("SELECT * from tablename1"); //ÔÚmytable±íÉÏÖ´ÐÐSQLÓï¾ä
$fields = mys
Ïà¹ØÎĵµ£º
ÓÃPHPʵÏÖ¼òµ¥µÄÊý¾Ýץȡ
·½·¨Ò»£º
<?php
$urlstr = file_get_contents("http://www.baidu.com");
$urlstr = htmlspecialchars($urlstr);
print_r($urlstr);
?>
·½·¨¶þ£º£¨ÐèÒª´ò¿ªcurlÀ©Õ¹£©
×¢Ò⣺´ò¿ªcurlÀ©Õ¹Ê±£¬Ò»¶¨Òª¿´¿ ......
×î½ü£¬ÓÐÐí¶àÅóÓÑÎÊÎÒÔÚWindowsXpÏÂPHPµÄ°²×°¹ý³Ì£¬ÕýºÃ×î½üÎÒÔÚ×Ô¼ºµÄ»úÆ÷Éϳɹ¦µÄÒÔÄ£¿é»¯µÄ·½Ê½°²×°ÁËPHP4.23¡£¼ÈÈ»Õâô¶àÅóÓÑÐèÒª£¬ÎÒ¾ÍÒÔ×î³£¼ûµÄIISºÍApache·þÎñÆ÷ΪÀý£¬°ÑPHPÔÚWindowsXPϵݲװ¹ý³Ìд³öÀ´°É£¬Ï£ÍûÄܶÔÒª°²×°PHPµÄÅóÓÑÓеã°ïÖú¡£Èç¹û²»¼ÓÌØÊâ˵Ã÷£¬ÒÔϵĽéÉÜͬʱҲÊÊÓÃÓÚWin2000°æ±¾¡£
Ò»¡¢¸ÅÊö£ ......
֮ǰÍøÒ³µÄchartsetÓõÄÊÇutf-8£¬ÎļþÒ²ÓÃutf-8£¬È»ºóÓÃfopen()´´½¨Ò»¸öÖÐÎÄÎļþÃûµÄÎļþʱÎÊÌâ¾Í³öÀ´ÁË£¬ÎļþÃû¶¼ÊÇÂÒ
Â룡
²é¿´Á˺ܶàÎĵµÊÔÁ˲»ÉÙ·½·¨¶¼½â¾ö²»ÁË£¬±¾À´Ïë×ÅÓñðµÄ·½·¨ÈƹýÕâ¸öÎÊÌ⣬ºöÈ»ÄÔ×ÓÀïÉÁ¹ýWindowsĬÈϵÄÎÄ×Ö±àÂëÊÇansi£¬È»ºóÔÙ
baiduÁËһϣ¬Ö¤ÊµÁËÕâµã£¬ËùÒÔÎÒµÄÍøÒ³Ò²Ó¦¸ÃÊÇansi±àÂë²ÅÄÜʹ´ ......
Ò»²¨ÈýÕÛ°¡£¬ÀÏÊÇÍü¼Ç´òµ¥´Ê
<body bgcolor="#0080FF"" >
<form action="bbs.php" method="post" name="Form">
<table border=0 cellpadding=2 cellspacing=0 >
<tr>
<td align=right>Ãû×Ö£º</td>
<td><input type=text size=40 ......