我刚学PHP,做了一个最简单的PHP页面,mysql也已经装好并能使用。以下是全部代码:
<?php
mysql_connect("localhost","root","password")
?>
提示出错为:
Fatal error: Call to undefined function: mysql_connect() in /var/www/html/test.php on line 2
...全文
50617打赏收藏
急!为什么老是提示mysql_connect()是未定义的函数
我刚学PHP,做了一个最简单的PHP页面,mysql也已经装好并能使用。以下是全部代码: 提示出错为: Fatal error: Call to undefined function: mysql_connect() in /var/www/html/test.php on line 2
[MySQL]
; Allow or prevent persistent links.
mysql.allow_persistent = On
; Maximum number of persistent links. -1 means no limit.
mysql.max_persistent = -1
; Maximum number of links (persistent + non-persistent). -1 means no limit.
mysql.max_links = -1
; Default port number for mysql_connect(). If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order). Win32 will only look
' at MYSQL_PORT.
mysql.default_port =
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
mysql.default_socket =
; Default host for mysql_connect() (doesn't apply in safe mode).
mysql.default_host =
; Default user for mysql_connect() (doesn't apply in safe mode).
mysql.default_user =