[KLUG Members] XHTML & PHP
Eric Beversluis
ebever at researchintegration.org
Wed Jul 25 19:34:27 EDT 2007
On Wed, 2007-07-25 at 18:44 -0400, Michael Lueck wrote:
> Eric Beversluis wrote:
> > "Parse error: syntax error, unexpected T_STRING in /var/www/template.php
> > on line 1"
>
> When you renamed the file template.php, did you also edit the file and start the file with:
>
> <?php
>
> and end the file with:
>
> ?>
>
> ????
>
No. The examples I'm looking at in the books only use the php tags
within the file. The only difference I can see with what I'm doing is
that they're using plain html (start and end with <html>...</html> and
I'm starting the doc with all the XHTML rigamarole:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
As I understand it, XHTML pages need to start exactly this way. (I'm
trying to be a good boy and use XHTML like "they" tell me to.)
EB
More information about the Members
mailing list