需要帮助获取Zend Library安装程序

时间:2012-11-17 20:41:08

标签: zend-framework include-path

好的,所以我搜索并搜索过,我发现的任何内容都无法解决问题。我有一个在本地设置的站点,然后我将其移动到服务器。我一直在尝试设置Zend库,但我似乎无法得到它。这是我的index.php文件。

<?php
ini_set('display_errors', 1);

defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/application'));

defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') :  'development'));

set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));


require_once 'Zend/Version.php';
echo 'Zend Framework Version = ' . Zend_Version::VERSION;


require_once 'Zend/Application.php';

$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap()
        ->run();

我不断收到错误消息“警告:require_once(Zend / Version.php):无法打开流:/var/www/vhosts/mywebsite.com/directory/index.php中没有这样的文件或目录17致命错误:require_once():在/ var / www / vhosts / mywebsite中打开所需的'Zend / Version.php'(include_path ='/ var / www / vhosts / mywebsite.com / directory / application / library /')失败.com / directory / index.php on line 17“

非常感谢任何帮助或指导。谢谢,

更新了代码,我现在收到此错误“警告:require_once(Zend / Application.php):无法打开流:/var/www/vhosts/mysite.com/directory/index中没有此类文件或目录。第19行的php致命错误:require_once():在第19行的/var/www/vhosts/mysite.com/directory/index.php中打开所需的'Zend / Application.php'(include_path =':。:')失败“

*注意 - 我的index.php和htaccess文件位于/var/www/vhosts/mysite.com/directory/,而不是/var/www/vhosts/mysite.com/directory/public/目录。

1 个答案:

答案 0 :(得分:0)