分享

写回答

发帖

[提问] win主机iis7.0不支持php的包含文件吗?

GoDaddy GoDaddy 2326 人阅读 | 5 人回复

发表于 2009-8-24 20:54:25 | 显示全部楼层 |阅读模式

  1. Warning: include(constants.php) [function.include]: failed to open stream: No such file or directory in D:\Hosting\4453550\html\XXXXXXXXX.com\common.php on line 45

  2. Warning: include() [function.include]: Failed opening 'constants.php' for inclusion (include_path='.;D:\Hosting%3550\html\XXXXXXXXX.com;D:\Hosting%3550\html\XXXXXXXXX.com/include;D:\Hosting%3550\html\XXXXXXXXX.com/adodb;D:\Hosting%3550\html\XXXXXXXXX.com/smarty') in D:\Hosting\4453550\html\XXXXXXXXX.com\common.php on line 45

  3. Warning: include_once(Payment_Config.php) [function.include-once]: failed to open stream: No such file or directory in D:\Hosting\4453550\html\XXXXXXXXX.com\common.php on line 132

  4. Warning: include_once() [function.include]: Failed opening 'Payment_Config.php' for inclusion (include_path='.;D:\Hosting%3550\html\XXXXXXXXX.com;D:\Hosting%3550\html\XXXXXXXXX.com/include;D:\Hosting%3550\html\XXXXXXXXX.com/adodb;D:\Hosting%3550\html\XXXXXXXXX.com/smarty') in D:\Hosting\4453550\html\XXXXXXXXX.com\common.php on line 132

  5. Warning: include_once(Payment_Data_Kipper.php) [function.include-once]: failed to open stream: No such file or directory in D:\Hosting\4453550\html\XXXXXXXXX.com\common.php on line 137

  6. Warning: include_once() [function.include]: Failed opening 'Payment_Data_Kipper.php' for inclusion (include_path='.;D:\Hosting%3550\html\XXXXXXXXX.com;D:\Hosting%3550\html\XXXXXXXXX.com/include;D:\Hosting%3550\html\XXXXXXXXX.com/adodb;D:\Hosting%3550\html\XXXXXXXXX.com/smarty') in D:\Hosting\4453550\html\XXXXXXXXX.com\common.php on line 137

  7. Warning: include_once(Payment_Engine.php) [function.include-once]: failed to open stream: No such file or directory in D:\Hosting\4453550\html\XXXXXXXXX.com\common.php on line 138

  8. Warning: include_once() [function.include]: Failed opening 'Payment_Engine.php' for inclusion (include_path='.;D:\Hosting%3550\html\XXXXXXXXX.com;D:\Hosting%3550\html\XXXXXXXXX.com/include;D:\Hosting%3550\html\XXXXXXXXX.com/adodb;D:\Hosting%3550\html\XXXXXXXXX.com/smarty') in D:\Hosting\4453550\html\XXXXXXXXX.com\common.php on line 138

  9. Warning: include(languages/) [function.include]: failed to open stream: No such file or directory in D:\Hosting\4453550\html\XXXXXXXXX.com\common.php on line 177

  10. Warning: include() [function.include]: Failed opening 'languages/' for inclusion (include_path='.;D:\Hosting%3550\html\XXXXXXXXX.com;D:\Hosting%3550\html\XXXXXXXXX.com/include;D:\Hosting%3550\html\XXXXXXXXX.com/adodb;D:\Hosting%3550\html\XXXXXXXXX.com/smarty') in D:\Hosting\4453550\html\XXXXXXXXX.com\common.php on line 177

  11. Fatal error: Call to a member function RowCount() on a non-object in D:\Hosting\4453550\html\XXXXXXXXX.com\include\functions_auth.php on line 8
复制代码

回答|共 5 个

riri11

发表于 2009-8-24 23:50:45 | 显示全部楼层

win下的路径貌似分隔符是/

add.c

发表于 2009-8-25 09:10:29 | 显示全部楼层

上面的绝对路径正确么?

tombo

发表于 2009-8-25 10:09:39 | 显示全部楼层

这个是common.php的源代码,请高手指教一下

include_once "adodb/tohtml.inc.php";
include_once "adodb/adodb.inc.php";

function PN_DBMsgError($db='',$prg='',$line=0,$message='Error accesing to the database') {
    $lcmessage = $message . "<br>" .
                "rogram: " . $prg . " - " . "Line N.: " . $line . "<br>" .
                "Database: " . $db->database . "<br> ";

    if ($db->ErrorNo()<>0) {
        $lcmessage .= "Error (" . $db->ErrorNo() . ") : " . $db->ErrorMsg() . "<br>";
    }
    die($lcmessage);
}
$dbconn = &ADONewConnection($config['dbtype']);
GLOBAL $ADODB_FETCH_MODE;

if ($config['dbtype'] == "ado_mssql") {
    if ($config['useoledb'] == 1) {
        $connectString = "SERVER=".$config['dbhost'].";DATABASE=".$config['dbname'].";";
        $dbh = $dbconn->Connect($connectString, $config["dbuname"], $config["dbpass"], "SQLOLEDB");
    } else {
        $connectString="ROVIDER=MSDASQL;DRIVER={SQL Server};"."SERVER=".$config['dbhost'].";DATABASE=".$config['dbname'].";id_user=".$config['dbuname']."WD=".$config['dbpass'].";";
        $dbh = $dbconn->Connect($connectString, "", "", "");
    }
} else {
    $connectString = $config['dbtype'].":".$config['dbuname'].":".$config['dbpass']."@".$config['dbhost']."/".$config['dbname'];
    $dbh = $dbconn->Connect($config['dbhost'],($config['dbuname']),($config['dbpass']),$config['dbname']);
}
$ADODB_FETCH_MODE = ADODB_FETCH_NUM;

// if we get an error, log it and die
if ($dbh === false) {
    error_log ("connect string: $connectString");
    error_log ("error: " . $dbconn->ErrorMsg());
// show error and die
    PN_DBMsgError($dbconn, __FILE__ , __LINE__, "Error connecting to db".$config['dbname']);
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////               
//          Smarty
$rs_smarty=$dbconn->Execute("select value from ".SETTINGS_TABLE." where name='admin_theme_path'");
if($rs_smarty->fields[0])
        $config["admin_theme_path"] = $rs_smarty->fields[0];
else
        $config["admin_theme_path"] = "/templates/admin";

$rs_smarty=$dbconn->Execute("select value from ".SETTINGS_TABLE." where name='index_theme_path'");
if($rs_smarty->fields[0])
        $config["index_theme_path"] = $rs_smarty->fields[0];
else
        $config["index_theme_path"] = "/templates/mm_pink";

$rs_smarty=$dbconn->Execute("select value from ".SETTINGS_TABLE." where name='mail_tpl_path'");
if($rs_smarty->fields[0])
        $config["mail_tpl_path"] = $rs_smarty->fields[0];
else
        $config["mail_tpl_path"] = "/templates/mail";


include_once "smarty/Smarty.class.php";

if ((isset($smarty) && !is_object($smarty)) || !isset($smarty))
        $smarty = new Smarty;
$smarty->force_compile = true;
$smarty->template_dir = $dir."/templates/";
$smarty->compile_dir = $dir."/templates_c";
$smarty->plugins_dir = $dir."/smarty/plugins";

if ($config["system"] == "win"){
    $smarty->assign("gentemplates", "file:".$dir.$config["index_theme_path"]);
    $smarty->assign("admingentemplates", "file:".$dir.$config["admin_theme_path"]);
}else{
    $smarty->assign("gentemplates", "file:".$config["site_path"].$config["index_theme_path"]);
    $smarty->assign("admingentemplates", "file:".$config["site_path"].$config["admin_theme_path"]);
}
if(!$smarty)        die("Smarty error");


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////               
/// paysistems
include_once "Payment_Config.php";

define('PAYMENT_DIR', $dir."/include/");
define('SYSTEMS_DIR', $dir."/include/systems/");

include_once "Payment_Data_Kipper.php";
include_once "Payment_Engine.php";


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////               
/// languages

$rs_smarty=$dbconn->Execute("select value from ".SETTINGS_TABLE." where name='default_lang'");
if($rs_smarty->fields[0])
        $config["default_lang"] = $rs_smarty->fields[0];
else
        $config["default_lang"] = "1";

$rs_smarty=$dbconn->Execute("select value from ".SETTINGS_TABLE." where name='path_lang'");
if($rs_smarty->fields[0])
        $config["path_lang"] = $rs_smarty->fields[0];
else
        $config["path_lang"] = "/languages";

if(isset($_GET["language_code"]) && strlen($_GET["language_code"])>0){
        $_SESSION["language"] = $_GET["language_code"];                        /// put in session
}
if(isset($_SESSION["language"]) && strval($_SESSION["language"])!=""){        /// from session
        $lang_code = $_SESSION["language"];
        $config["default_lang"] = $_SESSION["language"];
}else{
        $lang_code = $config["default_lang"];
}

//// load language interface
$strSQL = "select charset, lang_file, code from ".LANGUAGE_TABLE." where id='".$lang_code."'";
$rs = $dbconn->Execute($strSQL);
$charset = $rs->fields[0];
$lang_file = $rs->fields[1];
$lang_code = $rs->fields[2];

if(substr($config["path_lang"], -1) != "/" && substr($config["path_lang"], -1) != "\\")         $config["path_lang"] = $config["path_lang"]."/";
if(substr($config["path_lang"], 0, 1) == "/" || substr($config["path_lang"],0,1) == "\\")         $config["path_lang"] = substr($config["path_lang"],1);
if(substr($lang_file,0,1) == "/" || substr($lang_file,0,1) == "\\") $lang_file = substr($lang_file, 1);

include $config["path_lang"].$lang_file;

$smarty->assign("default_lang", $lang_code);
$smarty->assign("charset", $charset);
$smarty->assign("lang", $lang);

//// if sistem installed into subfolders
$smarty->assign("site_root", $config["site_root"]);
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////               
/// phpmailer
include_once "include/class.phpmailer.php";
$PHPmailer = new PHPMailer();

/// get resize options
$rs_smarty=$dbconn->Execute("select value from ".SETTINGS_TABLE." where name='use_image_resize'");
$config["use_image_resize"] = intval($rs_smarty->fields[0]);

?>
RAKSmart

add.c

发表于 2009-8-25 10:53:09 | 显示全部楼层

php程序建议你还是用Linux空间吧

tombo

发表于 2009-8-25 11:47:17 | 显示全部楼层

已经买了。。。。。。。。。。。。。。

不想换。。。。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则