问题描述
我正在使用mysql 5.2在Windows Vista上运行PHP5。我有一个简单的php
文件
< ;?
$ dbc = mysql_connect();
?>
当我运行该文件时,我收到此错误:
致命错误:在E中调用未定义的函数mysql_connect():第2行
\ mysite \ connecttest.php
PHP似乎安装正确。我可能做错了什么?
I''m running PHP5 on Windows Vista with mysql 5.2. I have a simple php
file with
<?
$dbc = mysql_connect ();
?>
When I run the file, I get this error:
Fatal error: Call to undefined function mysql_connect() in E:\www
\mysite\connecttest.php on line 2
PHP seems to be installed correctly. What could I be doing wrong?
推荐答案
*配置*是否正确?特别是:你加载了mysql扩展吗?
Is it *configured* correctly? Especially: Did you load the mysql extension?
*配置*是否正确?特别是:你加载了mysql扩展吗?
Is it *configured* correctly? Especially: Did you load the mysql extension?
我只安装了mysql并创建了一个数据库。有一些
的问题。我想移动数据库,但不知道怎么样,我不知道如何告诉mysql允许连接的位置。
odbc管理员工具中没有mysql odbc。
我刚刚下载了此处列出的扩展名:。
他们谈论修改一个php.ini文件。但是,我没有那个
文件。我最近的文件是:
- php.ini-dist
- php.ini-recommended
所有这些听起来都是正确的吗?谢谢。
I only installed mysql and created a database. There are a few
problems. I''d like to move the database but don''t know how and am not
sure how to tell mysql where it is to allow connections.
There isn''t a mysql odbc in the odbc administrator tools.
I just downloaded the extension listed here: http://dev.mysql.com/downloads/connector/php/.
They talk about modifying a php.ini file. However, I don''t have that
file. The closest files I have are:
- php.ini-dist
- php.ini-recommended
Does all of that sound correct? Thanks.
这篇关于mysql_connect()在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!