Hi there,


Try include_once(), it's much safer

Cheers,

Gareth

On 17 Feb 2004, at 23:02, Alex Hogan wrote:

Hi All,



What are the rules of thumb for classes and included files?



Can I not include a file in a class function? If I put the include()
outside the class structure everything works fine, but when I put it inside
the class it freaks.




Am I doing something wrong?



Class myclass{

Include('myfile'); -- doesn't work

Funciton myfunc($var1, $var2){

Include('myfile'); -- doesn't work

}

}



But,



include('myfile'); -- works

Class myclass{



Funciton myfunc($var1, $var2){

.....

}

}



Why?







alex hogan





******************************************************************
The contents of this e-mail and any files transmitted with it are
confidential and intended solely for the use of the individual or
entity to whom it is addressed.  The views stated herein do not
necessarily represent the view of the company.  If you are not the
intended recipient of this e-mail you may not copy, forward,
disclose, or otherwise use it or any part of it in any form
whatsoever.  If you have received this e-mail in error please
e-mail the sender.
******************************************************************



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



Reply via email to