Jump to content

Recommended Posts

Posted (edited)

Can you use too many, and are there any implications in including an include within an include. I know they work as I have tested it.

 

The reason for asking is I have a couple of "news" boxes on my site, which will give a snippet of news and then have a link to the full story. Sometimes I may only have one box, or may have three and I don't want to have to update every page so wanted to have the whole left column which includes navigation into one php file.

 

Thoughts, comments, advice please.

Edited by youngros
Posted

I agree that you can put includes inside includes; it just makes the page a bit more complicated and you have to keep a check on what's happening when they all display.

Posted

as long as you don't include a page more than once.

 

eg

 

index.php includes config.php

index.php includes header.php

header.php includes config.php

 

you will get error about "headers already sent"

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...