set_include_path Zend çerçevesi dahil değildir

2 Cevap php

Ben bu deyimi var:

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

Ben Acl kütüphaneyi kullanmaya çalıştığınızda ama o dosyayı bulmak mümkün değil gibi görünüyor;

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

Yol gerçekten yolunda, ben basılmış dahildir. Herhangi bir fikir?

2 Cevap

"Zend" sizin require_once talimatta ise, muhtemelen de include_path koymak zorunda değilsiniz.

Lütfen dizinleri bu gibi görünüyorsa:

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

Sizin include_pathdaki muhtemelen olmalıdır:

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

(Without the "Zend "bölümü)


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

Zaten dahil yolunda /Zend çünkü Belki de öyledir? Yani ya bunu

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

veya

require_once 'Acl/Resource/Interface.php';

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