In the interest of standardization on xhtml transitional I've thought of putting the DOCTYPE required statements in an external module and include them in my php programs.
Heres the content of module _doctype.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"<html xmlns="<!--***********************************************************************-->
OK - that said, here's how I include it in my programs:
.
.
session_start();
include_once("_doctype.php");
.
.
This appears to work just fine. My question concerns this: I DON'T OUTPUT this at all. Originally my included module contained $DOCTYPE="<blah blah>"; and in my output I used print $DOCTYPE; but that was causing errors. Research showed that the output was including the "$DOCTYPE=" literal as well.
I therefore removed this operative.
Again, the ONLY reference in the program is the include_once of the module. No physical command to output it at all. However, the multitude of pages that this program creates all seem to work just fine! Go figure.
Can someone perhaps please explain why this works? I can guess but I would rather not. I would rather understand why!
Thanks,
Heres the content of module _doctype.php:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"<html xmlns="<!--***********************************************************************-->
OK - that said, here's how I include it in my programs:
.
.
session_start();
include_once("_doctype.php");
.
.
This appears to work just fine. My question concerns this: I DON'T OUTPUT this at all. Originally my included module contained $DOCTYPE="<blah blah>"; and in my output I used print $DOCTYPE; but that was causing errors. Research showed that the output was including the "$DOCTYPE=" literal as well.
I therefore removed this operative.
Again, the ONLY reference in the program is the include_once of the module. No physical command to output it at all. However, the multitude of pages that this program creates all seem to work just fine! Go figure.
Can someone perhaps please explain why this works? I can guess but I would rather not. I would rather understand why!
Thanks,