page within a page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jaymoore_299
Forum Contributor
Posts: 128
Joined: Wed May 11, 2005 6:40 pm
Contact:

page within a page

Post by jaymoore_299 »

I want to have it so that when a surfer clicks a link, he is sent to a page where the page requested is found below, and at the top there would be some space where I can put more relevant links, banners, etc. I've seen this done with perl, I was wondering if the same can be done with php.

I don't want to use frames, I'd prefer just a clean divide with no option for the surfer to adjust the frame. Any ideas on how to do this?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

Deemo
Forum Contributor
Posts: 418
Joined: Sun Jan 18, 2004 11:48 am
Location: Washington DC

Post by Deemo »

or require() if you want PHP to return an error if it cant find it
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

on a different note...but same topic, what is the diff betwen include_once and include, and require_once and require?
SBro
Forum Commoner
Posts: 98
Joined: Tue Sep 30, 2003 10:06 pm

Post by SBro »

include() can include the same file more then once, while if include_once() is used it will not include the file again if it's already been included somewhere else in the page. Same thing goes for require and require_once() ie.

Code: Select all

// content of header.php will be included twice
include('header.php');
include('header.php');

/* use of include_once() */

// content of header.php will be included only once
include_once('header.php');
include_once('header.php');
include_once and require_once are slightly slower then their counterparts, because they search to see if the file has already been included.
User avatar
harrisonad
Forum Contributor
Posts: 288
Joined: Fri Oct 15, 2004 4:58 am
Location: Philippines
Contact:

Re: page within a page

Post by harrisonad »

jaymoore_299 wrote:... I've seen this done with perl, ...
Can you post samlpe url?
Post Reply