Hi
I have changed my server to enable webpages with html extensions to use PHP.
How do I display a webpage with this DOCTYPE (see below) because the browser now displays an error for the first line?
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Thanks
Shiningtor
DOCTYPE prob
Moderator: General Moderators
- jimthunderbird
- Forum Contributor
- Posts: 147
- Joined: Tue Jul 04, 2006 3:59 am
- Location: San Francisco, CA
Re: DOCTYPE prob
I have similar problem before.
Maybe just use php's print command:
print “<?xml version=”1.0″?>";
instead of write it directly in html
Hope this helps.
-- Jim
Maybe just use php's print command:
print “<?xml version=”1.0″?>";
instead of write it directly in html
Hope this helps.
-- Jim
-
deadoralive
- Forum Commoner
- Posts: 28
- Joined: Tue Nov 06, 2007 1:24 pm
Re: DOCTYPE prob
look in your php.ini file for the short_open_tags setting. Change this to off and you shouldn't have any more problems
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Re: DOCTYPE prob
One's code should be flexible enough to work whether short tags are enabled or not. Therefore printing the statement is better.deadoralive wrote:look in your php.ini file for the short_open_tags setting. Change this to off and you shouldn't have any more problems
-
shiningtor
- Forum Newbie
- Posts: 4
- Joined: Fri Sep 21, 2007 11:39 am
Re: DOCTYPE prob
Many thanks for that.
Shiningtor
Shiningtor