SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: Should I use PHP include
-
Oct 15, 2001, 08:12 #1
Should I use PHP include
Hi there everyone,
Currently, I have a navigation bar which I have very badly included in the top of every page on my site. Bad idea as I have found out recently when I wanted to update a link and had to up date the whole site. Doh!
My question is should I use PHP include instead to embed my header? I suppose then I could have one navigation file and just use the include to embed it in the top of every page. Is this a better way of doing it? How much will it slow down the page loading?
MaximusMaximus
Sheffield Sport
http://www.solidsport.co.uk
-
Oct 15, 2001, 10:36 #2
- Join Date
- Sep 2001
- Location
- Amsterdam
- Posts
- 160
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I use php include throughout my site. I recommend that you use it. You will not notice to any difference in the speed of your site. Anyway, any tiny lose of performace is far outweighed by the ease of maitainence that the using include files provide.
I have two tickets to the Crows, sweet.
-
Oct 15, 2001, 11:44 #3
- Join Date
- Oct 2000
- Location
- Nashvegas Baby!
- Posts
- 7,845
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Are you using PHP anywhere else on your site? If not then you might not need the PHP include function. Server Side Includes work just fine for that.
Adobe Certified Coldfusion MX 7 Developer
Adobe Certified Advanced Coldfusion MX Developer
My Blog (new) | My Family | My Freelance | My Recipes
-
Oct 15, 2001, 12:10 #4
- Join Date
- Jun 2001
- Location
- Toronto, Canada
- Posts
- 9,123
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Using includes is recommended if you aren't doing entirely server side processing.
The only thing to be wary of is using too many. I've seen people go hyper on includes and use 20+ per page... Don't! Try and stay at 2-3 at most.
-
Oct 15, 2001, 12:16 #5
Thanks for the advice!
Thank you kindly for the advice.
In answer to your question I do have a little bit of PHP already running on my feedback page so I know PHP include is supported/running.
Thanks again guys. And thanks for the very quick response, much appreciated.
Thanks,Maximus
Sheffield Sport
http://www.solidsport.co.uk
Bookmarks