我有一个网站在我的本地主机上运行得很好,但是.我把它上传到了几个免费的网站托管(2000网站主机和主机),当我试图打开它时,收到了以下消息:
警告:require(core/libs/smarty/S节.class.php):未能打开流:在第7行/home/u327900732/public_html/www/index.php中没有这样的文件或目录 致命错误:要求():在/home/u327900732/public_html/www/index.php第7行中的/home/u327900732/public_html/www/index.php(包括_path=.:/opt/php-5.5/pear‘)中的打开失败要求’core/libs/smarty/S烈士.class.php‘
这是代码:
<?php
session_start();
$view = isset($_GET['view']) ? $_GET['view'] : 'index';
require_once('core/libs/smarty/Smarty.class.php');
require('core/models/class.Conexion.php');
if(file_exists('core/controllers/'.$view.'Controller.php')){
include('core/controllers/'.$view.'Controller.php');
}else {
include('core/controllers/errorcontroller.php');
}
?>我查了一百遍那份文件就在那儿。
我找到并尝试了这个解决方案:
警告:include(core/libs/smarty/S节.class.php):未能打开流:在第7行/home/u327900732/public_html/www/index.php中没有这样的文件或目录 警告: include():未能在第7行的/home/u327900732/public_html/www/index.php中打开‘core/libs/smarty/s烈士.class.php’以便包含(include_path=.:/opt/php-5.5/pear‘)。 致命错误:在第3行的/home/u327900732/public_html/www/core/controllers/indexController.php中找不到'Smarty‘类
警告:require(1 1core/libs/smarty/S节.class.php):未能打开流:在第7行/home/u327900732/public_html/www/index.php中没有这样的文件或目录 致命错误:要求():在第7行的/home/u327900732/public_html/www/index.php中,打开失败需要‘1 1core/libs/smarty/s烈士.class.php’(包括_path=.:/opt/php-5.5/pear‘)。
警告: require_once(/home/u327900732/public_html/core/libs/smarty/Smarty.class.php):未能打开流:第7行/home/u327900732/public_html/www/index.php中没有这样的文件或目录 致命错误:'/home/u327900732/public_html/core/libs/smarty/Smarty.class.php‘():打开失败需要在/home/u327900732/public_html/www/index.php第7行中的/home/u327900732/public_html/www/index.php中使用require_once(包含_path=’.:/opt/php-5.5/pear‘)
我试着在这条路上加上“./”,但它仍然不起作用。重复一遍,这个网站在我的本地主机上运行得很好。救命啊!
发布于 2016-01-13 03:42:01
尝试使用完整的url来测试您的url。或者在浏览器中签入以检查文件是否存在。就像这里:
http://host.com/core/libs/smarty/Smarty.class.php
我认为它会显示错误,显示您的文件不存在。
https://stackoverflow.com/questions/34757856
复制相似问题