|
Posted by Juha Suni on 12/09/05 16:33
Andy Jeffries wrote:
> On Thu, 08 Dec 2005 10:38:37 -0800, juglesh wrote:
>>
>> Instead of including the header/footer/etc on each of your pages, try
>> having the header/footer on your index.php, then include the content
>> as needed. You will wind up having links that look like
>> www.domain.com/index.php?page=home,
>> www.domain.com/index.php?page=contact etc.
>
> The downside to that is if "page=contact" needs to redirect on some
> condition (you won't be able to send headers as the content will have
> already started).
>
> It's a nice idea and works fine for small sites, but the way you
> phrased it seems like the "header/footer" way is for newbies and more
> experienced coders use the "?page=blah" mechanism, whereas IMHO I'd
> say it's exactly reversed.
I'd say this is more personal preference. Both ways can work perfectly well.
You could do some preprocessing before outputting anything (thus allowing
redirections), or you could just use output buffering to allow
header-redirects anywhere.
--
Suni
[Back to original message]
|