Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-29-2004, 04:45 PM   PM User | #1
Tails
Regular Coder

 
Join Date: Nov 2002
Posts: 672
Thanks: 1
Thanked 1 Time in 1 Post
Tails is an unknown quantity at this point
XHTML 1.1 Doctype displays error in PHP pages

I just wanted to make a sample PHP page to test things as I go through some tutorials. But the DOCTYPE of my page is throwing errors. The page content is:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>PHP testing </title>
</head>
<body>
</body>
</html>


The error is:
Parameter entity must be defined before it is used. Error processing resource 'http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd'. Line 85, Position 2

%xhtml-prefw-redecl.mod;
-^


There's not 85 lines in my page, and it's claiming the error is in the dtd (browsers read those upon each page parse?). But the page works fine if I remove the XML declaration. I don't know why that causes problems. I don't have PHP shorttags on. This is just an ordinary page with the exception of having a PHP extension.

EDIT: apparently I forgot to turn my server on

Last edited by Tails; 03-29-2004 at 05:01 PM..
Tails is offline   Reply With Quote
Old 03-29-2004, 10:06 PM   PM User | #2
bcarl314
Mega-ultimate member


 
Join Date: Jun 2002
Location: Winona, MN - The land of 10,000 lakes
Posts: 1,855
Thanks: 1
Thanked 45 Times in 42 Posts
bcarl314 will become famous soon enough
Try using echo to print the first line.

I.e

PHP Code:
echo "<?xml version="1.0\" encoding=\"ISO-8859-1\"?>";
bcarl314 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:30 PM.


Advertisement
Log in to turn off these ads.