php 连接 mysql 不成功? 服务器为apache2_2

[复制链接]
查看11 | 回复4 | 2010-9-2 21:34:00 | 显示全部楼层 |阅读模式
用这个页面测试时能正确显示PFH的信息,成功!

PHP环境信息
[B]

[/B]
但用这个页面时

测试页面



显示
Fatal error: Call to undefined function mysql_connect() in I:\phpdocs\t.php on line 11
不知道为什么,那位高手指导一下!!!!!!
[MySQL]
; Allow accessing, from PHP's perspective, local files with LOAD DATA statements
; http://php.net/mysql.allow_local_infile
mysql.allow_local_infile = On
; Allow or prevent persistent links.
; http://php.net/mysql.allow-persistent
mysql.allow_persistent = On
; If mysqlnd is used: Number of cache slots for the internal result set cache
; http://php.net/mysql.cache_size
mysql.cache_size = 2000
; Maximum number of persistent links.-1 means no limit.
; http://php.net/mysql.max-persistent
mysql.max_persistent = -1
; Maximum number of links (persistent + non-persistent).-1 means no limit.
; http://php.net/mysql.max-links
mysql.max_links = -1

回复

使用道具 举报

千问 | 2010-9-2 21:34:00 | 显示全部楼层
php.ini里面mysql.dll一行之前的 ;号没有去掉,就是没有开启mysql你还是新手吧,推荐用xampp集成环境,不用你配置了
回复

使用道具 举报

千问 | 2010-9-2 21:34:00 | 显示全部楼层
mysql_connect未定义找到你的php.ini文件,查找到extension=php_mysql.dll 将前面的 ; 去掉
回复

使用道具 举报

千问 | 2010-9-2 21:34:00 | 显示全部楼层
你看一下你php信息页面里面有没有有mysql?没有的话就是你的配置有问题!
回复

使用道具 举报

千问 | 2010-9-2 21:34:00 | 显示全部楼层
建议使用wamp5等你学会了再自己去配置环境
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行