set_include_path不包括Zend框架

I have this statement:

set_include_path('/sites/intranet/includes/Zend' . PATH_SEPARATOR . get_include_path());

but when I try to use the Acl library it seems that is not able to find the file;

require_once 'Zend/Acl/Resource/Interface.php';

The path is really included in the path, I have printed it. Any idea?

If "Zend" is in your require_once instruction, you probably don't have to put it in your include_path too.

If your directories look like this :

/sites/intranet/includes/Zend/Acl/Resource/Interface.php

Your include_path should probably be :

set_include_path('/sites/intranet/includes' . PATH_SEPARATOR . get_include_path());

(Without the "Zend" part)


As a sidenote : why are you not using the autoloader ?

Maybe it is because you already has /Zend in the include path? So either do this

set_include_path('/sites/intranet/includes' . PATH_SEPARATOR . get_include_path());

or

require_once 'Acl/Resource/Interface.php';

Due to the zend frameworks autoloader, the first one is recommended.