|
-
Feb 9th, 2005, 08:18 PM
#1
importing an other php file
I have a php page and I am importing an other one. In the start of the first php file I am opening up the DB and all that, furuther down in that PHP file I am importing the the other one. Do I still have to open the DB in that file too?
ØØ
Last edited by NoteMe; Feb 10th, 2005 at 04:37 PM.
-
Feb 9th, 2005, 10:29 PM
#2
Re: importing an other php file
No. It will inherit the connection.
-
Feb 10th, 2005, 01:27 AM
#3
Re: importing an other php file
When you import a file using include or require te following happens:
- PHP mode exits and HTML mode is entered.
- The entire file is evaluaated as if it were at there at that point in the soource code.
You have access to all the variables you would originally have access to. If inside a function you will have access to all the local variables and the global variables from the $GLOBALS array, just like you normally would.
-
Feb 10th, 2005, 04:37 PM
#4
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
|