|
apache+php+mysql
apahce php均正常,
phpinfo()中显示正常
mysql 数据库也正常
'./configure' '--enable-jstring' '--enable-mbregex' '--enable-sigchild' '--libdir=/usr/lib/php4' '--includedir=/usr/include' '--with-pgsql=shared' '--with-imap=shared' '--with-ldap=shared' '--with-mysql=shared' '--prefix=//usr' '--with-apxs=/usr/sbin/apxs' '--with-config-file-path=/etc/httpd' '--enable-safe-mode' '--disable-debug' '--with-zlib' '--without-gd' '--enable-debugger' '--enable-magic-quotes' '--enable-track-vars'
在浏览器中输入localhost/test.php报错
Call to undefined function: mysql_connect() in test.php line 4
test.php内容:
<html>
<body>
<?
$db = mysql_connect("localhost","","");
mysql_select_db("mydb",$db);
$result=mysql_query("SELECT * FROM employees",$db);
printf("First Name: %s<br>\n",mysql_result($result,0,"first"));
printf("Last Name: %s<br>\n",mysql_result($result,0,"last"));
printf("Address: %s<br>\n",mysql_result($result,0,"address"));
printf("osition: %s<br>\n",mysql_result($result,0,"position"));
?>
</body>
</html>
请教如何解决?
我在网上找了半天,没有解决 |
|