Determining doctype inside included php code

77 views Asked by At

I'm making changes to a php script (include.php) that is included by many different PHP scripts which create HTML code (web pages).

The developers that maintain those web pages use different doctype, and some are complaining that validator gives them errors. They do not want to change their code - they want me to fix include.php so that it will work for them.

One problem is that some doctypes require / at the end of tags like <br>, while others don't want /

Is it possible for my include.php to determine the doctype of the script that is including it?

0

There are 0 answers