Re: Real Simple, But I'm New!!
| From: | G Schneider | Date: | Sat, 29 Dec 2001 19:27:53 +0000 |
| Subject: | Re: Real Simple, But I'm New!! | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-11206@lists.php.net to get a copy of this message | ||
Hi Lee,
I'm not quite sure what you mean, but to include other files into a PHP
script, you use the include("file.html"); function.
So, if you have a page called news.html and you want to include it into a
PHP page called display.php, you would use some code like this:
<?php
// this is display.php
if ( $page == "news" ) {
include("news.html");
}
?>
And the link to the page would look like this: display.php?page=news
Hope this helps,
- Jefferrs
* e-mail: jefferrs@blueyonder.co.uk
* homepage: http://webmastersdog.com
______________________________________
worlds' best webhosting:
http://www.openhosting.co.uk/default.asp?r=GB1500175
read the reviews:
http://www.findsp.com/Hosting/ShowReviews.asp?CompanyID=286
"Fishcake" <lee.osborne@lineone.net> wrote in message
news:20011229114245.47456.qmail@pb1.pair.com...
> Hey,
>
> I've just started learning php and I need to know this... What are the
> commands I use to get i.e. index.php?links and index.php?news to
> work?
> I have a site, with the menu down one side, and I need to have the ?news
> page as an include for news.html(or php), etc. etc. I hope this makes
> sense to someone, I think it does to me?!?!?
>
> Lee...
>
>