开发者

defining a path

开发者 https://www.devze.com 2023-02-08 21:18 出处:网络
I am setting up a Zend environment and cannot get the past this error. This is the code: define(\'APPLICATION_PATH\', realpath(dirname(__FILE__)). \'../application\');

I am setting up a Zend environment and cannot get the past this error.

This is the code:

define('APPLICATION_PATH', realpath(dirname(__FILE__)). '../application');

set_include_path(APPLICATION_PATH . '/../library/' 
      开发者_如何学Go          . PATH_SEPARATOR . get_include_path()
                );
echo APPLICATION_PATH;

require_once 'Zend/Loader.php';

This is the error:

Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)'


At the very least, you are missing a slash before the ../application:

define('APPLICATION_PATH', realpath(dirname(FILE)). '/../application');

set_include_path(APPLICATION_PATH . '/../library/' . PATH_SEPARATOR . get_include_path() ); echo APPLICATION_PATH;

To provide more details, I think we'd need to know about the directory structure, where the index.php is, etc.


I was able to fix this problem on my own. I realized that the controller folder was misspelled. It looks like this error is usually caused when the appropriate file structure isn't there or if the controller file is misspelled.

0

精彩评论

暂无评论...
验证码 换一张
取 消