Re: extending a class using includes not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is the include in your class 2 file the very first line, before you start declaring your class 2 classes? The class 1 file has to be loaded before you start extending it, obviously, but just checking.

The other problem may be with your paths. Wherever your template file is located is where is your includes will be looked for in relation to, along with the php.ini include path. For a quick test, you can try using an absolute path reference for your include files instead of a relative path and see if that works. If it does, then you have a path problem.

On May 25, 2005, at 2:30 PM, Charles Kline wrote:

hi all.

i have 2 class files. say for example.

class 1

class 2 extends class 1

class 2  uses include_once("firstclass.php")

then i use include_once ("secondclass.php") in my template. this does not work. to get it to work, i must put both the files as includes in my template.
any ideas why?


thanks,
charles

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux