1

您好,我在格式化我的机器后尝试再次安装 zend 框架,但我不断收到此错误...我已经完成了以前安装的一个项目,但这次安装刚刚失败..

 >>>Warning: require_once(Zend/Application.php) [function.require-once]:       to          open stream:  
No such file or directory in C:\xampp\htdocs\home\public\index.php on line 18



Fatal error: require_once() [function.require]: Failed opening required     'Zend/Application.php' (include_path='C:\xampp\htdocs\home\library;“.') in C:\xampp \htdocs\home\public\index.php on line 18
            This is my index.php page
    >>// 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
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../library'),
    get_include_path(),
)));

/** Zend_Application */
require_once 'Zend/Application.php';

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

//

   The application.php is already inside the library/zend package...
   This is my application.ini
    [production]
    phpSettings.display_startup_errors = 0
    phpSettings.display_errors = 0
    includePaths.library = APPLICATION_PATH "/../library"
    bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
    bootstrap.class = "Bootstrap"
     appnamespace = "Application"
    resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
    resources.frontController.params.displayExceptions = 0

    [staging : production]

    [testing : production]
    phpSettings.display_startup_errors = 1
     phpSettings.display_errors = 1



    [development : production]
    phpSettings.display_startup_errors = 1
    phpSettings.display_errors = 1
    resources.frontController.params.displayExceptions = 1
I just dont understand why it cant get that file yet it is inside the Zend    folder...

从我的角度来看,一切看起来都很好 Pliz 帮助...在此先感谢

4

1 回答 1

0

确保您的 ZF 库文件夹在您的 php.ini 中包含路径。

在我的机器上(典型的 windows + xampp),该文件可以在 c:\xampp\php\php.ini 中找到

寻找线:

include_path = "." 

并将其更改为包含您的 ZF 库路径

include_path = ".;C:\path\to\Zend\Parent\Directory";

如果您的 ZF 库位于 C:\xampp\ZF\library\Zend,则包含路径应​​为“C:\xampp\ZF\library”。

于 2013-06-18T15:54:40.597 回答