No. of Recommendations: 0

I was helping a friend move his old site over to another host. The site uses PHP.

On the new site, the pages throw up an error

Parse error: syntax error, unexpected 'version' (T_STRING) in /home/username/public_html/product/index.php on line 1

The problem seems to be that the page has this code in it

<?xml version="1.0" encoding="utf-8"?>

I removed it and tested the page and it fixed the problem, but I can't figure out why this section is creating a problem. I tried commenting out this first line via

// and /* */

but it didn't seem to ignore this first line.

Thanks for your help.
Print the post  


What was Your Dumbest Investment?
Share it with us -- and learn from others' stories of flubs.
When Life Gives You Lemons
We all have had hardships and made poor decisions. The important thing is how we respond and grow. Read the story of a Fool who started from nothing, and looks to gain everything.
Contact Us
Contact Customer Service and other Fool departments here.
Work for Fools?
Winner of the Washingtonian great places to work, and Glassdoor #1 Company to Work For 2015! Have access to all of TMF's online and email products for FREE, and be paid for your contributions to TMF! Click the link and start your Fool career.