开发者

mysql_connect not defined

I'm testing a connection to mysql 5.1, with php5 on apache2 (windows).

I have made a regular php test connection page from a tutorial but I'm getting the error "mysql_connect" not defined.

In eclipse for php, I see the function defined under the language library. However when I make a page:

<?php
 phpinfo();
?>

I don't see mysql functions or anything there; can someone tell me why? I thought PHP5 at the least would开发者_JAVA百科 support MySQL, no?


The MySQL extension is probably not enabled. If you look through the php.ini file, you should be able to find the appropriate line. phpinfo() will show the location of the php.ini file.


there is php documentation

http://php.net/docs.php

mysql_connect

http://php.net/manual/en/function.mysql-connect.php

however mysql extension should be enabled in php.ini

(linux: /etc/apache2/)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜