我在localhost工作中有项目zend框架但是当我在1&amp; 1上传时我有这个错误: 警告:require_once(/../ library / Zend / Loader / Autoloader.php):无法打开流:第18行/homepages/9/d675656264/htdocs/project/public/index.php中没有此类文件或目录< / p>
这是我的index.php
define('APPLICATION_ENV', 'production');
// Define path to application directory
defined ( 'APPLICATION_PATH' ) || define ( 'APPLICATION_PATH', realpath ( dirname ( __FILE__ ) . '/application' ) );
// Define application environment
defined ( 'APPLICATION_ENV' ) || define ( 'APPLICATION_ENV', (getenv ( 'APPLICATION_ENV' ) ? getenv ( 'APPLICATION_ENV' ) : 'production') );
// Ensure library/ is on include_path
$rootPath = dirname(__FILE__);
set_include_path(
PATH_SEPARATOR . $rootPath . DIRECTORY_SEPARATOR . '/../../library' .
PATH_SEPARATOR . get_include_path());
// To enable autoloader, (this is a new way of using autoloader)
require_once '/../library/Zend/Loader/Autoloader.php';
答案 0 :(得分:0)
尝试添加__DIR__
,以便它使用完整路径
require __DIR__.'/../library/Zend/Loader/Autoloader.php';