UnThreaded | Threaded | Whole Thread (4) | Ignore Thread Prev | Next
Author: coolprash Big gold star, 5000 posts Old School Fool Add to my Favorite Fools Ignore this person (you won't see their posts anymore) Number: of 16451  
Subject: PHP site giving error Date: 7/10/2014 4:22 PM
Post New | Post Reply | Reply Later | Create Poll . Report this Post | Recommend it!
Recommendations: 0
Hi,

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.
Post New | Post Reply | Reply Later | Create Poll . Report this Post | Recommend it!
Print the post  
UnThreaded | Threaded | Whole Thread (4) | Ignore Thread Prev | Next

Announcements

Pencils of Promise - Back to School Drive
"Pencils of Promise works with communities across the globe to build schools and create programs that provide education opportunities for children."
Managing Your Wealth
Our own TMFHockeypop from Rule Your Retirement fame on the TV show Managing Your Wealth.
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.
Post of the Day:
Value Hounds

My Big Fat Greek Splat
What was Your Dumbest Investment?
Share it with us -- and learn from others' stories of flubs.
Community Home
Speak Your Mind, Start Your Blog, Rate Your Stocks

Community Team Fools - who are those TMF's?
Contact Us
Contact Customer Service and other Fool departments here.
Work for Fools?
Winner of the Washingtonian great places to work, and "#1 Media Company to Work For" (BusinessInsider 2011)! 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.
Advertisement