php连接虚拟机中mysql数据库吗_在虚拟主机上PHP连接MYSQL

我用DW在本地编辑,测试没问题。<?phprequire_once ('Connections/igey.php');mysql_query("SETNAMES'UTF8'");?><?phpif (!function_exists("GetSQLValueString")){functionGetSQLValue...

我用DW在本地编辑,测试没问题。

if (!function_exists("GetSQLValueString")) {

function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")

{

$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {

case "text":

$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";

break;

case "long":

case "int":

$theValue = ($theValue != "") ? intval($theValue) : "NULL";

break;

case "double":

$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";

break;

case "date":

$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";

break;

case "defined":

$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;

break;

}

return $theValue;

}

}

mysql_select_db($database_igey, $igey);

$query_Recordset1 = "SELECT * FROM food";

$Recordset1 = mysql_query($query_Recordset1, $igey) or die(mysql_error());

$row_Recordset1 = mysql_fetch_assoc($Recordset1);

$totalRows_Recordset1 = mysql_num_rows($Recordset1);

?>

mysql_free_result($Recordset1);

?>

上传了虚拟主机,在虚拟主机上并列:wwwroot,databases,other几个文件夹,我把index.php放在wwwroot,把在本地的数据库文件igey文件夹放在databases下(我也把.sql文件导进去了也不行),会出现以下问题:Warning: require_once(Connections/igey.php) [function.require-once]: failed to open stream: No such file or directory in D:\wwwroot\igey\wwwroot\index.php on line 1

请问应该要怎么处理?

展开

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值