So, this is pertaining to the same set of code I’ve been drilling you guys in this forum about. Basically I have a protected section that users can log into and instead of writing the code for the pages in every php file, I figured I could have one template and just code the info that is specific to that part of the section into each php file. It sounded good to me and worked well in my perl version of the same sort of thing I made (except I think I’m gonna have to split up the template because I still can’t seem to get the preg_match() or strpos() functions to work like I want them to).
Anyway, I open the template with fopen and print it out like so:
[CODE]
while(!feof($login))
{
echo fgetc($login);
}
But, when I do this, even though it prints out the doctype
[QUOTE]
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN”
“
When I view the page in a browser it looks as if the doctype isn’t there. Is there something I’m doing wrong here? Should I be printing out a header before the template?
I tried this:
[CODE]
header(‘Content-type: text/html’);
But that didn’t work.
Anybody know what the problem might be?
Thanks,
Douglas