请教:php连不上mysql,急盼复,在线等

taotaobujue 2004-12-17 11:03:13
我的php.ini文件中的mysql配置如下
[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 =

; Default password for mysql_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo cfg_get_var("mysql.default_password")
; and reveal this password! And of course, any users with read access to this
; file will be able to reveal the password as well.
mysql.default_password =
我的php-mysql模块也装啦.
我的语句如下:
<?
$cc=mysql_connect('192.168.0.18','root','123456');
echo "$cc<br/>";
?>
可还是报错:
Fatal error: Call to undefined function: mysql_connect() in /var/www/html/testmysql.php on line 2

这是怎么回事,求教.求求大侠们啦!在线等!!!!!!!!!!
...全文
261 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复
logo 设计不会,就这样先凑合了写道 Fuseblog预备开发带在线SHOP功能的个人博客系统.仿照Appfuse 提供一个完全自动化的ant构建脚本.在线SHOP的数据库建模图例已经 在博客中贴出.感兴趣的和我一起搭建,嘻嘻 文档博客地址: http://forum.sinomagazine.com 开发环境: Jcreator-4.5 JDK-1.5 Ant-1.6.1 MYSQL-5 Tomcat-5.5 Spring-2.5.6 Ibatis-2.3.4 问题事项: 1.在windows系统中,命令行中执行ant命令时,当指定的 构建脚本文件中包含中文字符,而构建脚本文件的编码是UTF-8时将会 Invalid byte 1 of 1-byte UTF-8 sequence. 的错误.这个问题尚未 知解决,故先采用GBK的编码. 2.在Jcreator中创建的项目,不支持UTF-8编码,缺省GBK. 以下先列出初步的的ant构建文件的代码: build.xml < project name= "tax-calculator" default= "package" > < property name= "src.dir" location= "src" / > ... by article2008 2008-07-30 回复 (0) 代码备份build.xml

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧