PHP file extension question: please help!
Posted: Mon Jul 22, 2002 2:13 pm
Hi all,
I want to include a navigation menu (navig.html) in every page of a site. For example, I used the following code in an ABOUT page:
<?php
$fp=fopen ('navig.html',"r");
$menu=fread ($fp, 30000);
fclose($fp);
echo $menu;
?>
And it works, but I must have the file ABOUT saved as a PHP file instead of a regular HTML page. Is there anyway I can keep the HTML extension but still display the content from navig.html using the above code?
Many thanks!!!
Catherine
I want to include a navigation menu (navig.html) in every page of a site. For example, I used the following code in an ABOUT page:
<?php
$fp=fopen ('navig.html',"r");
$menu=fread ($fp, 30000);
fclose($fp);
echo $menu;
?>
And it works, but I must have the file ABOUT saved as a PHP file instead of a regular HTML page. Is there anyway I can keep the HTML extension but still display the content from navig.html using the above code?
Many thanks!!!
Catherine