PHP Question regarding include()
| From: | janda2@dingoblue.net.au | Date: | Wed, 29 Nov 2000 11:04:30 +0000 |
| Subject: | PHP Question regarding include() | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-27798@lists.php.net to get a copy of this message | ||
I have been using PHP for a few weeks now and have found it very useful. I am in the process of rewriting my website using PHP.
I have a index.php, which imports a header.php and footer.php. But I want to call header.php with some variables defined in index.php. i.e. "header.php?title=homepage".
I current have:
include("header.php?headertitle=homepage&headersection=home");
in index.php. This is so each content page can set the title and 'section' for the header of each page.
and in header.php
<title>Daniel's Website:<? $headertitle ?></title>However when I load index.php in my web browser I get: Warning: Failed opening 'header.php?headertitle=homepage&headersection=home' for inclusion (include_path='.:/usr/local/lib/php') in /home/daniel/public_html/new/index.php on line 2 I think I need to use another function, but due to the fact I am new to PHP I am not sure what that would be, any assistance would be appreciated. Thanks, Daniel.