获得;require_once(Zend/Loader/Autoloader.php):无法打开流:没有这样的文件或目录;
我正在使用NetBeans IDE 8。我已经在Netbeans中正确配置了zendframework 1.12.1 但是Zend库文件Autoload.php无法加载。我得到这个错误: require_once(Zend/Loader/Autoloader.php):无法打开流:第62行的C:\wamp\www\RentAFlat Zend\public\index.php中没有这样的文件或目录 这是我的index.php获得;require_once(Zend/Loader/Autoloader.php):无法打开流:没有这样的文件或目录;,php,zend-framework,Php,Zend Framework,我正在使用NetBeans IDE 8。我已经在Netbeans中正确配置了zendframework 1.12.1 但是Zend库文件Autoload.php无法加载。我得到这个错误: require_once(Zend/Loader/Autoloader.php):无法打开流:第62行的C:\wamp\www\RentAFlat Zend\public\index.php中没有这样的文件或目录 这是我的index.php ini_set("display_errors", E_ALL);
ini_set("display_errors", E_ALL);
// 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(),
)));
require_once('Zend/Loader/Autoloader.php');
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->setFallbackAutoloader(true);
/** 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();
NetBeans中配置的Zend/Loader/Autoloader.php不会影响应用程序的运行-这只是为了自动完成等的类/方法感知。您需要检查第15行之后的
get\u include\u path()
中的内容(即当您重置include路径时)。从那里调试:路径是否包括Zend
文件夹的位置?
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path()[,]
)));