mysql_connect()在哪里? [英] Where is mysql_connect()?

查看:69
本文介绍了mysql_connect()在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用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?

推荐答案

dbc = mysql_connect();

?>


当我运行该文件时,我收到此错误:

致命错误:调用E中的未定义函数mysql_connect():\ www />第2行
\ mysite \ connecttest.php


PHP似乎安装正确。我可能做错了什么?

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?


2007年3月4日11:21:30 -0800 schrieb brett:
Am 4 Mar 2007 11:21:30 -0800 schrieb brett:

PHP似乎安装正确。我能做错什么?
PHP seems to be installed correctly. What could I be doing wrong?



*配置*是否正确?特别是:你加载了mysql扩展吗?

Is it *configured* correctly? Especially: Did you load the mysql extension?


3月4日上午11:23,Simon Stienen< n ... @ news.slashlife.orgwrote:
On Mar 4, 11:23 am, Simon Stienen <n...@news.slashlife.orgwrote:

2007年3月4日11:21:30 -0800 schrieb brett:
Am 4 Mar 2007 11:21:30 -0800 schrieb brett:

PHP似乎安装正确。我能做错什么?
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并创建了一个数据库。有一些

的问题。我想移动数据库,但不知道怎么样,我不知道如何告诉mysql允许连接的位置。


odbc管理员工具中没有mysql odbc。


我刚刚下载了此处列出的扩展名: http://dev.mysql.com/downloads/connector/php/

他们谈论修改一个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()在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆