Zend framework 需要获取Zend库设置的帮助吗

Zend framework 需要获取Zend库设置的帮助吗,zend-framework,include-path,Zend Framework,Include Path,好吧,我搜索了又搜索,但我没有找到解决问题的方法。我有一个在本地设置的站点,然后我将其移动到服务器。我一直在尝试建立Zend图书馆,但我似乎无法获得它。这是我的index.php文件 <?php ini_set('display_errors', 1); defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/application')); defined('APP

好吧,我搜索了又搜索,但我没有找到解决问题的方法。我有一个在本地设置的站点,然后我将其移动到服务器。我一直在尝试建立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();

的路径是向上的
/../library/


我用github的代码更改了代码,现在我收到错误消息“警告:require_once(Zend/Application.php):无法打开流:第19行/var/www/vhosts/mysite.com/directory/index.php中没有这样的文件或目录致命错误:require_once():无法打开所需的“Zend/Application.php”(include_path=':)在第19行的/var/www/vhosts/mysite.com/directory/index.php中。我的index.php文件不在“public”文件夹中。我将index.php文件和.htaccess文件移动到应用程序和库目录所在的/mysite.com/directory/。为什么要移动index.php和.htaccess?这是个坏主意@Barrett我建议您使用链接中显示的相同项目目录结构。是最流行的结构,可防止我看到的内部文件意外变色。我改变结构的原因是,当我访问mysite.com时,我什么也没有得到,所以我必须使用url mysite.com/public来获取错误。当用户访问“www.mysite.com”链接时,index.php文件会被执行吗?所以我想我可能已经找到了答案。我使用了Zend framework 2库,其中没有application.php文件。为什么会这样?为了运行Zend framework 2,我需要做什么特殊的事情吗?