Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 08-12-2006, 07:13 AM   #1
spacedog
Yes that IS me. Bitch.
 
Industry Role:
Join Date: Nov 2001
Posts: 14,149
Please phpelp... multiple includes..

I am trying to put this thing together,, It's in all pieces.

Code:
<?php
	include '_config/config.php';
	header('location:'.$sDefaultCountry.'/index.php');
?>
That's the existing code I have in place on one page to call up script & php generated pages.. now, I also have several other pages from other scripts.. I need to tie them all together navigation wise & created a header.htm that I want at the top of all pages & the footer at bottom of all pages..

What do I need to do so that header.htm is first, then the above, then the footer??


header.htm footer.inc.php
spacedog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-12-2006, 07:21 AM   #2
Damian_Maxcash
So Fucking Banned
 
Join Date: Oct 2002
Location: MaxCash.com
Posts: 12,745
I have just got up - and its going to take at least 2 coffees for me to just work out what the question is .... maybe later if nobody else had done it.
Damian_Maxcash is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-12-2006, 07:24 AM   #3
spacedog
Yes that IS me. Bitch.
 
Industry Role:
Join Date: Nov 2001
Posts: 14,149
Better yet, if I rename index.php to body.php, then is there a way I can include the 3 parts ie include header.htm & body.php & footer.inc.php & name this page index.php & when visited it displays 1st header, then body.php & last footer?
spacedog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-12-2006, 07:26 AM   #4
u-Bob
there's no $$$ in porn
 
u-Bob's Avatar
 
Industry Role:
Join Date: Jul 2005
Location: icq: 195./568.-230 (btw: not getting offline msgs)
Posts: 33,063
First sending (including) an html file and then including the code you pasted (code that sends a "header('Location..."), won't work.
u-Bob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-12-2006, 07:29 AM   #5
u-Bob
there's no $$$ in porn
 
u-Bob's Avatar
 
Industry Role:
Join Date: Jul 2005
Location: icq: 195./568.-230 (btw: not getting offline msgs)
Posts: 33,063
Quote:
Originally Posted by spacedog
Better yet, if I rename index.php to body.php, then is there a way I can include the 3 parts ie include header.htm & body.php & footer.inc.php & name this page index.php & when visited it displays 1st header, then body.php & last footer?
Code:
<?php
include('header.htm');
include('body.php');
include('footer.inc.php');
?>
btw: your header.htm is probably static html so you can gain some speed by using:

Code:
<?php 
readfile('header.htm'); 
include('body.php'); 
include('footer.inc.php'); 
?>

Last edited by u-Bob; 08-12-2006 at 07:31 AM..
u-Bob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-12-2006, 07:29 AM   #6
spacedog
Yes that IS me. Bitch.
 
Industry Role:
Join Date: Nov 2001
Posts: 14,149
Quote:
Originally Posted by u-Bob
First sending (including) an html file and then including the code you pasted (code that sends a "header('Location..."), won't work.
what if I rename header.htm to top.htm, or top.php?
spacedog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-12-2006, 07:30 AM   #7
spacedog
Yes that IS me. Bitch.
 
Industry Role:
Join Date: Nov 2001
Posts: 14,149
Quote:
Originally Posted by u-Bob
Code:
<?php
include('header.htm');
include('body.php');
include('footer.inc.php');
?>
I'm trying this,,, thanks..
spacedog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-12-2006, 07:34 AM   #8
u-Bob
there's no $$$ in porn
 
u-Bob's Avatar
 
Industry Role:
Join Date: Jul 2005
Location: icq: 195./568.-230 (btw: not getting offline msgs)
Posts: 33,063
Quote:
Originally Posted by spacedog
what if I rename header.htm to top.htm, or top.php?
file name doesn't matter... PHP can't send HTTP headers followed by html followed by more HTTP headers...
u-Bob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-12-2006, 07:36 AM   #9
spacedog
Yes that IS me. Bitch.
 
Industry Role:
Join Date: Nov 2001
Posts: 14,149
I tried your code & page shows header & footer, but won't display body?

This also does work for the other pages I want to use this on, but not this one specific page that has the code I have in initial post?
spacedog is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-12-2006, 07:40 AM   #10
u-Bob
there's no $$$ in porn
 
u-Bob's Avatar
 
Industry Role:
Join Date: Jul 2005
Location: icq: 195./568.-230 (btw: not getting offline msgs)
Posts: 33,063
contents of body.php?
u-Bob is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.