ablock Posted July 12, 2006 Share Posted July 12, 2006 Here's my scenario...file 1.php instantiates a class x.class x's constructor includes file 2.phpsince this is pretty seems the same as if 1.php was including 2.php itself, it would dictate that 2.php should have access to object x...but it's not working out that way...please help Link to comment https://forums.phpfreaks.com/topic/14414-question-about-include/ Share on other sites More sharing options...
ablock Posted July 12, 2006 Author Share Posted July 12, 2006 Problem solved...I forgot the php functions assumes all variables are in local scope unless you specify with 'global' Link to comment https://forums.phpfreaks.com/topic/14414-question-about-include/#findComment-56999 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.