PHP Version 4.1.1 System Windows NT 5.0 build 2195
Build Date Dec 30 2001
Server API Apache
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\WINNT\php.ini
ZEND_DEBUG disabled
Thread Safety enabled
Build Date Dec 30 2001
Server API Apache
Virtual Directory Support enabled
Configuration File (php.ini) Path C:\WINNT\php.ini
ZEND_DEBUG disabled
Thread Safety enabled
不要说不会改,连未定型的东西都敢用。不是高手也差不了多少。
不要说不会改,连未定型的东西都敢用。不是高手也差不了多少。
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 3.23.22-beta
php/extensions中找不到。
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<head>
<title>Apache、PHP、MySQL 整体测试</title>
</head>
<body bgcolor="white"> <script language = "php"> $dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '';
$dbname = 'test2';
$dbtable = 'books'; /* ------ 数据库连结 -------- */
$mysql_link = mysql_connect($dbhost,$dbuser,$dbpass);
$column = mysql_list_fields($dbname,$dbtable,$mysql_link);
$sql = "SELECT * FROM $dbtable";
$result = mysql_db_query($dbname,$sql); </script> <table bgcolor="black">
<tr><td>
<table>
<script language = "php">
while($value = mysql_fetch_array($result))
{
print "<tr BGCOLOR=YELLOW>";
for($i=0; $i< mysql_num_fields($column); $i++ )
{
print "<td> $value[$i] </td>";
}
print "</tr>";
}
mysql_free_result($result);
mysql_close();
</script>
</table>
</td></tr>
</table> </body>
</html> 错误如下:
Warning: mysql_connect(): Can't connect to MySQL server on 'localhost' (10061) in C:\Apache\Apache2\htdocs\PHP_01\EX02\EX02-01.php on line 18 Warning: mysql_list_fields(): supplied argument is not a valid MySQL-Link resource in C:\Apache\Apache2\htdocs\PHP_01\EX02\EX02-01.php on line 19 Warning: mysql_db_query(): Can't connect to MySQL server on 'localhost' (10061) in C:\Apache\Apache2\htdocs\PHP_01\EX02\EX02-01.php on line 21 Warning: mysql_db_query(): A link to the server could not be established in C:\Apache\Apache2\htdocs\PHP_01\EX02\EX02-01.php on line 21