zend-framework - 警告 : require_once(Zend/Application. php):无法打开流:/var/w 中没有这样的文件或目录

标签 zend-framework

我的索引文件是这个

<?php
ini_set( "short_open_tag", 1 );
ini_set( "display_errors", 1 );
// 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'
);

// Let 'er rip
$application->bootstrap()->run();

当我运行它时

警告:require_once(Zend/Application.php):无法打开流:/var/www/Giftercity_backup/index.php 中第 18 行没有这样的文件或目录 fatal error :require_once():需要打开失败 'Zend/Application.php' (include_path=':.:/usr/share/php:/usr/share/pear') 在/var/www/Giftercity_backup/index.php 第 18 行

最佳答案

对于 Ubuntu。
如果你安装了 ZendFramework 包。即 sudo apt-get install zend-framework
它会将 zend 库文件放在 /usr/share/php/libzend-framework-php/Zend/文件夹中
您只需将 Zend/文件夹复制并粘贴到/user/share/php/
在终端中运行以下命令。

cd /usr/share/php
sudo cp -R libzend-framework-php/Zend/ Zend

关于zend-framework - 警告 : require_once(Zend/Application. php):无法打开流:/var/w 中没有这样的文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19379866/

相关文章:

php 自定义 C++ 模块从命令行工作,而不是在网络服务器上工作

php - Zend PDF 自动换行

php - Zend MySQL 检查表是否存在

php - Zend 多个 where

php - Zend php 在查询中设置不同

php - 如何从 zendframework 2.0 数据库中检索特定值

zend-framework - 多重/嵌套 "select where"与 Zend_Db_Select

php - 如何从字符串而不是文件渲染 Zend_View 脚本

css - $this->headLink() 包含重复的脚本

zend-framework - Zend - 设计模式数据映射器和表网关