-
Moderator The Minister of No Crap
Code:
<?php require("somepage.php");?>
I am having some trouble using two PHP includes in the same page. Is this because PHP only supports one PHP include at a time? Are there any other potential limitations I should know about?
Thanks in advance.
-scott
http://www.scottmanning.com/
-
use include ("somepage.php"); instead - this will definitely execute all code in somepage.php and include then into your page (at the position you call include()).
read the documentation to see what's the difference between require() and include().
Yours
HTD
-
I use many include() calls in my PHP scripts and they all work fine for me.
Happy Flashing
-
Moderator The Minister of No Crap
Hmmmmm...
Then if I'm having trouble including two php scripts at the same time, it must be a problem with php scripts I'm trying to include. Sound right to you guys?
The actual problem
When I include two php scripts, the first one shows up, but the second is not there along with the rest of the main page.
-scott
http://www.scottmanning.com/
-
I never experienced that.
maybe there's some problem with the html code, so that the browser doesn't display it, or diplays white text on white background?
show us your source maybe it's something else...
Yours
HTD
-
Moderator The Minister of No Crap
Okay, guys. I figured it out. It was a problem with the PHP scripts I was trying to include. Thanks for your help. I wouldn't have been able to figure it out, if you hadn't of cleared up the who multiple php includes question.
-scott
http://www.scottmanning.com/
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
|