Thanks Christophe, include_path was the right hint as I don't wan't to alter the vendor files where require_once is used. I'm using include_path with the add_include_path function from
http://de3.php.net/manual/en/function.set-include-path.php Works fine. regards Peter On 12 Mrz., 23:04, Christophe COEVOET <[email protected]> wrote: > Le 12/03/2011 22:51, pzwosta a crit : > > > Hi, > > > I try to include a 3rd party (Zend) class. The directory structure is > > like that: > > > \vendor > > \name > > \lib > > \name > > Class.php (includes class Name_Class) > > \Subdir > > SubClass (includes Name_Subdir_SubClass) > > > //Class.php > > require_once 'name/Subdir/SubClass.php'; > > > I can use Name_Class.php by adding name as a prefix in app > > \autoload.php > > > $loader->registerPrefixes(array( > > Name_' => __DIR__.'/../vendor/name/lib', > > > But I get an error on require_once - SubClass.php is not found. > > > Does anyone have an idea how to handle that without changing the > > vendor files? > > > Thanks Peter > > When using autoloading you should not use require_once but let the > autoloader find it. > > In the current case, using require_once in Class.php the way you wrote > would require adding the /path/to/vendor/name/lib directory in the > include_path > > -- > Christophe | Stof -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
