我的索引文件是这个
<?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/