Forum Moderators: phranque
would the best way be to
include("header.php");
#other stuff
include("footer.php");
on every page (totally php code)
or to have a file like
<?
#return.php
#header stuff
if(file_exists($file)) include($file);
#footer stuff
?>
and then add a .htaccess that looked like this
[pre]RewriteEngine on
RewriteCond %{REQUEST_URI}!^return.php
RewriteCond %{REQUEST_URI} -f
RewriteRule (.*) return.php?file=$1[/pre]
both of these ways will work, but the second seems easier
has anyone experimented with these techniques?
ideas? recomendations?
By the way, why you are checking the existence of the file from php if you have it checked by the apache previously?