警告:发生require_once错误

时间:2015-03-25 10:14:05

标签: php codeigniter opencart

当我尝试从远程服务器下载我的opencart网站并将其安装在本地服务器上时出现此错误请帮我解决这个问题?

  

警告:require_once(/home/healthisallc/public_html/healthisall.co.in/system/startup.php):无法打开流:C:\ xampp \ htdocs \ healthisall \ index.php中没有此类文件或目录在第26行


  

致命错误:require_once():无法打开所需的'/home/healthisallc/public_html/healthisall.co.in/system/startup.php'(include_path ='。; C:\ xampp \ php \ PEAR')第26行的C:\ xampp \ htdocs \ healthisall \ index.php

1 个答案:

答案 0 :(得分:0)

您已将所有内容从Linux - 服务器转移到Windows - 计算机。作为绝对Unix路径中包含的路径(以/开头),Windows无法识别它们,因此无法找到正确的文件。

我建议你用相对路径替换它们。

像这样:

require_once '/home/healthisallc/public_html/healthisall.co.in/system/startup.php';

变为:

require_once 'system/startup.php';

这将使PHP在包含它的脚本所在的文件夹中的子文件夹startup.php下查找文件system

您还可以set_include_path()列出您希望PHP在包含文件时查看的所有文件夹。

相关问题