|
-
Feb 13th, 2005, 04:44 AM
#7
Re: Importing an other php file [Part2]
Like Pino said, if you include a file, it takes the code from the file and insterts it at the point. Therefore it inherits, as it were, the current scope of the code.
So if you include a file inside a class function then you will inherit the scope of that function, inlcuding its local variables and the scope of the class. If you include a file inside a function, it will inherit the scope of that function and all its local variables and finally if you include a file globally, you inherit all the global variables.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|