You are viewing a plain text version of this content. The canonical link for it is here.
Posted to zeta-users@incubator.apache.org by Christian Grobmeier <gr...@gmail.com> on 2010/10/06 15:14:04 UTC

[zeta-users] Autoloading classes

Hello guys,

I am confused by the autoloader which i tried today. Maybe you can
give me some kind of a starter.

My Base package is in the folder:

/lib/zetacomponents/Base/src

then I wrote to my /index.php:

require_once ("lib/zetacomponents/Base/src/base.php");

function __autoload($class) {
ezcBase::autoload( $class );
}

But it fails loading with this path:
\lib\zetacomponents\Base\src/../../autoload/base_file_autoload.php

I tried to setWorkingDirectory but it also fails.

So, any pointers what I am missing?
I am using the SVN trunk version

Cheers,
Christian

[zeta-users] Re: Autoloading classes

Posted by Christian Grobmeier <gr...@gmail.com>.
wow got it. Didn see the setup-env script

On Wed, Oct 6, 2010 at 5:14 PM, Christian Grobmeier <gr...@gmail.com> wrote:
> Hello guys,
>
> I am confused by the autoloader which i tried today. Maybe you can
> give me some kind of a starter.
>
> My Base package is in the folder:
>
> /lib/zetacomponents/Base/src
>
> then I wrote to my /index.php:
>
> require_once ("lib/zetacomponents/Base/src/base.php");
>
> function __autoload($class) {
> ezcBase::autoload( $class );
> }
>
> But it fails loading with this path:
> \lib\zetacomponents\Base\src/../../autoload/base_file_autoload.php
>
> I tried to setWorkingDirectory but it also fails.
>
> So, any pointers what I am missing?
> I am using the SVN trunk version
>
> Cheers,
> Christian
>