很急的问题?

true_mariner 2006-06-13 10:45:28
同样的代码在php5.1+apache2.0.49+mysql5.0能够顺利运行,但在ZDE下却提示错误,代码如下:
<?php
$db="localhost";
$user="root";
$pwd="";
$res=mysql_connect($db,$user,$pwd) or die(mysql_error());
if($res){
echo "chenggong";
}
else {
echo "shibai";
}
?>
在ZDE下提示错误信息为:
Fatal error: Call to undefined function mysql_connect() in D:\phpsite\quanxian\3.php on line 5
请高手帮忙解决??急?急?
...全文
433 20 打赏 收藏 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
true_mariner 2006-06-20
  • 打赏
  • 举报
回复
请问怎么设?在那里设呀?
zeroleonhart 2006-06-19
  • 打赏
  • 举报
回复
sorry,it should be libmysql.dll
zeroleonhart 2006-06-19
  • 打赏
  • 举报
回复
copy php_mysql.dll to %system%/windows/system32/
pellet 2006-06-19
  • 打赏
  • 举报
回复
你可以把ZDE的调试选项设成服务器http://127.0.0.1啊

这样保证你ZDE测试出来的结果和你的apache上的结果一样
true_mariner 2006-06-18
  • 打赏
  • 举报
回复
请大家帮我解决呀?
iasky 2006-06-16
  • 打赏
  • 举报
回复
zde中的php.ini文件的位置
true_mariner 2006-06-16
  • 打赏
  • 举报
回复
xuzuning(唠叨):
请你去:http://community.csdn.net/Expert/topic/4824/4824297.xml?temp=3.309268E-02
xuzuning 2006-06-16
  • 打赏
  • 举报
回复
是的需要修改!
把你在apache中可用的php.ini中的
extension_dir=???
行和需要加载的扩展
extension=php_xxxxx.dll
行复制到D:\zend studio5.20\bin\php5\php.ini中去
true_mariner 2006-06-16
  • 打赏
  • 举报
回复
我将
extension_dir = "e:\php5\ext"
extension=php_mysql.dll
两行拷如ZDE下的php.ini文件中,却提示"无法定位程序输入点_zval_copy_ctor_func于动态连接库php5ts.dll上",和"php startup:unable to load dynamic library'e:\php5\ext\php_mysql.dll'"找不到指定的程序"的错误信息,请问怎么修改
true_mariner 2006-06-16
  • 打赏
  • 举报
回复
D:\zend studio5.20\bin\php5\php.ini
true_mariner 2006-06-15
  • 打赏
  • 举报
回复
make sure ZDE knows the directory of the php_mysql.dll file
那怎样设置才能是它找到php_mysql.dll文件
true_mariner 2006-06-15
  • 打赏
  • 举报
回复
xuzuning(唠叨):
ZDE中的php.ini指向D盘,里面只有三行数据:
zend_extension_ts=D:\zend studio5.20\lib\php5\ZendDebuggerLocal.dll
zend_debugger.allow_hosts=127.0.0.1/32
session.save_path=D:\zend studio5.20\tmp

但是我的php5在E盘里,请问这里需要修改吗?
xuzuning 2006-06-15
  • 打赏
  • 举报
回复
你在ZDE中执行phpinfo();看看他的php.ini在哪里
zeroleonhart 2006-06-15
  • 打赏
  • 举报
回复
make sure ZDE knows the directory of the php_mysql.dll file
true_mariner 2006-06-14
  • 打赏
  • 举报
回复
怎么没有人解决我的问题呀?请大家帮帮忙!这个问题我已经想办法解决有好几天了,但总是没有结果,很郁闷!!!!
true_mariner 2006-06-14
  • 打赏
  • 举报
回复
好的,我回去试试看,在这里先谢了!
lincahe 2006-06-14
  • 打赏
  • 举报
回复
你在mydql_connect($db,$user,$pwd)这里要加多个数据库的链接,如mydql_connect($db,$user,$pwd,$databasename),$databasename指数据库名,没有数据库,当然会报错的啦,要么就加多个mysql_query($databasename)这个,这样就不会报错了,你试试看
true_mariner 2006-06-14
  • 打赏
  • 举报
回复
ZDE的PHP怎么配置呀?我所有的php.ini中的extension=php_mysql.dll前的“;”全去掉了?????
true_mariner 2006-06-14
  • 打赏
  • 举报
回复
还是不行,又出现了错误信息:

<?php
$db="localhost";
$user="root";
$pwd="";
$databasename="quanxian";
$res=mysql_connect($db,$user,$pwd,$databasename) or die(mysql_error());
if($res){
echo "chenggong";
}
else {
echo "shibai";
}
?>


Content-type: text/html
X-Powered-By: PHP/5.0.4

<br />
<b>Fatal error</b>: Call to undefined function mysql_connect() in <b>D:\phpsite\quanxian\1.php</b> on line <b>6</b><br />

mrshelly 2006-06-13
  • 打赏
  • 举报
回复
ZDE 的PHP没有配置好。没有设置对MYSQL的支持。

21,889

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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