Re: Page title changes when call functions!!

From: Date: Thu, 01 Aug 2002 04:49:58 +0000
Subject: Re: Page title changes when call functions!!
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-110641@lists.php.net to get a copy of this message
My code is quite long so I try to make it short by describe it instead of posting the code here. Please tell me if you need more information. There are two functions in a file named a.inc. One function is named output_header($title) and another function is named output_content($content). The former is used to set the page title and the latter is used to printout the content of the page. There are many files that contain HTML code, which assemble for a very nice page frame, e.g. file1.inc for the menu bar and file2.inc for the footer. In the index.php, it starts by setting the page title to something, for example "Home Page". Then comprise the page frame by including file1.inc and file2.inc. In between, it calls the function output_content($content) to print the content of the page. Thus, the code will look like this... <? .. output_header("Home Page");' .. require(file1.inc); //print the menu bar output_content("Some message as a page content"); .. require(file2.inc); //print the footer ?> When I open the index.php through my IE5, the page title is not "Home Page" but http://www.xxx.com/index.php instead. Hope this information is good enough and thanks for trying to help. Sailom "Justin French" <justin@indent.com.au> wrote in message news:B96EF485.BC9A%justin@indent.com.au... > You'd need to show us some code, preferably not 100's of lines.... perhaps > put it up on the web somewhere so we can see the source code or something. > > Justin French > > > on 01/08/02 2:16 PM, Sailom (amorndet@colorado.edu) wrote: > > > I am a newbie in this area so please be patient for my silly question :) > > > > I have a bad experience coding in PHP. I create a home page in PHP, > > index.php. Within this PHP code, it calls functions which are placed in > > other file. I notice that the page title changes to something that I don't > > want it to be. My question is.. > > > > 1. Why the page title changes? > > 2. How to make the title not to change when making function call? > > > > Thanks > > > > >

« previous php.general (#110641) next »