我尝试用mysql连接php,不过老是失败了。以下是出错的信息:
Fatal error: Call to undefined function mysql_pconnect() in /var/www/helloworld.php on line 7
请到底出现什么问题?
求助:mysql如何连接php
-
- 帖子: 11
- 注册时间: 2006-03-02 18:47
- firehare
- 帖子: 2625
- 注册时间: 2005-04-10 16:54
- 来自: 温州大学
- 联系:
-
- 帖子: 11
- 注册时间: 2006-03-02 18:47
怎样配置那个php.ini文件,使它可以连接到数据库mysql
如下是php.ini的一部分。
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
;include_path = ".:/usr/share/php"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues. The alternate is to use the
; cgi.force_redirect configuration below
doc_root =
; The directory under which PHP opens the script using /~username used only
; if nonempty.
user_dir =
; Directory in which the loadable extensions (modules) reside.
; extension_dir = "./"
; Whether or not to enable the dl() function. The dl() function does NOT work
如下是php.ini的一部分。
;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
; UNIX: "/path1:/path2"
;include_path = ".:/usr/share/php"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"
; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues. The alternate is to use the
; cgi.force_redirect configuration below
doc_root =
; The directory under which PHP opens the script using /~username used only
; if nonempty.
user_dir =
; Directory in which the loadable extensions (modules) reside.
; extension_dir = "./"
; Whether or not to enable the dl() function. The dl() function does NOT work
-
- 帖子: 11
- 注册时间: 2006-03-02 18:47
- firehare
- 帖子: 2625
- 注册时间: 2005-04-10 16:54
- 来自: 温州大学
- 联系:
-
- 帖子: 11
- 注册时间: 2006-03-02 18:47
-
- 帖子: 47
- 注册时间: 2006-04-08 10:31
- 联系: