Jump to content


Photo

Question about include


  • Please log in to reply
1 reply to this topic

#1 ablock

ablock
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 12 July 2006 - 09:06 PM

Here's my scenario...

file 1.php instantiates a class x.
class x's constructor includes file 2.php

since 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

#2 ablock

ablock
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 12 July 2006 - 10:36 PM

Problem solved...I forgot the php functions assumes all variables are in local scope unless you specify with 'global'




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users