Jump to content

Archived

This topic is now archived and is closed to further replies.

ablock

Question about include

Recommended Posts

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

Share this post


Link to post
Share on other sites
Problem solved...I forgot the php functions assumes all variables are in local scope unless you specify with 'global'

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.