Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Parse error

  1. #1
    Regular Coder
    Join Date
    Jun 2003
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Parse error

    I'm getting this error when I run this php script

    PHP Code:
    Parse errorparse errorunexpected T_STRING in /hsphere/local/groupxxxxxxxxxxxright.php on line 1 
    Here's my script:

    PHP Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!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>Right Frame</title>

    <meta http-equiv="refresh" content="120">

    </head>

    <body bgcolor="#ffffff">

    <br>
    <br>

    <P align="center"><font face="arial"><font size="6"><font color="black">2006 Top 3-Year-Old Colt 

    Pacers</font></font>

    <div align="center"><font face="arial"><font size="2"><font color="black">Sorted by Earnings</font></font>

    <br>

    <?php 

    include("2006_top_3yr_olds.php");
    ?>

    </table>
    I cant figure out what is wrong. It was working fine until I added the html code at the beginning.

    Anything wrong here?

    Thanks.

    jls

  • #2
    Regular Coder ralph l mayo's Avatar
    Join Date
    Nov 2005
    Posts
    951
    Thanks
    1
    Thanked 31 Times in 29 Posts
    Sometimes PHP doesn't like the XML declaration. Try changing the first line to:

    PHP Code:
    <?php echo '<?xml version="1.0" encoding="UTF-8"?>'?>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •