我用Zend做了一个测试appli并尝试将它放在网上(在ovh共享服务器上)
离线运行(使用WampServer),但不在线。 这是我无法解决的错误:
Warning: require_once(/library/Zend/loader/Autoloader.php) [function.require-once]:
failed to open stream: No such file or directory in
/homez.483/<site>/www/files/<project>/index.php on line 22
Fatal error: require_once() [function.require]: Failed opening required
'/library/Zend/loader/Autoloader.php'
(include_path='.
:/homez.483/<site>/www/files/<project>/library
:/homez.483/<site>/www/files/<project>/application
:/homez.483/<site>/www/files/<project>/application/models
:/homez.483/<site>/www/files/<project>/application/forms
:.:/usr/local/lib/php')
in /homez.483/<site>/www/files/<project>/index.php on line 22
这是index.php的一部分,它位于服务器上的www / files / project中:
// Definition de variable d'environnement
defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/application/'));
defined('LIBRARY_PATH') || define('LIBRARY_PATH', realpath(dirname(__FILE__) . '/library/'));
defined('MODELS_PATH') || define('MODELS_PATH', realpath(dirname(__FILE__) . '/application/models/'));
defined('FORMS_PATH') || define('FORMS_PATH', realpath(dirname(__FILE__) . '/application/forms/'));
defined('APPLICATION_ENV') || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : $applicationEnv));
// Mise en place des répertoires et chargement des classes
set_include_path('.'
. PATH_SEPARATOR . LIBRARY_PATH
. PATH_SEPARATOR . APPLICATION_PATH
. PATH_SEPARATOR . MODELS_PATH
. PATH_SEPARATOR . FORMS_PATH
. PATH_SEPARATOR . get_include_path());
require_once 'Zend/loader/Autoloader.php';
Zend_Loader_Autoloader::getInstance()->setFallbackAutoloader(true);
.htaccess启用PHP5和UrlRewriting,但无事可做......
# Config OVH
AddType x-mapp-php5 .php
SetEnv PHP_VER 5
SetEnv REGISTER_GLOBALS 0
SetEnv MAGIC_QUOTES 0
SetEnv SHORT_OPEN_TAG 1
# Règles de réécriture pour Zend Framework
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php
RewriteRule ^robots.txt$ robots.txt [L]
有没有人有办法解决这个问题? 我想这很明显,但我探索了网上发现的许多方法而没有成功。
由于
答案 0 :(得分:1)
您服务器的文件系统区分大小写。
更改此行
require_once'Zend / loader / Autoloader.php';
到
require_once 'Zend/Loader/Autoloader.php';
Loader
目录以大写字母“L”开头。