我用 Zend 做了一个测试应用程序并试图把它放到网上(在一个 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]
有没有人有办法解决这个问题?我想这很明显,但我探索了很多在网上找到的方法,但都没有成功。
谢谢