I need the PEAR module, Services_Ebay in my ZF1 project. I'd like to put it and its dependencies in /library so the project is completely self-contained.
Is there a recommended way of doing this while using either ZF's or PEAR's autoloaders?
Setup your include path with
set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__ . '/library/');
That makes sure the require statements in the lib itself work. PEAR1 libraries don't have an autoloader, you need to require_once
the first file you need.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.