/    Sign up×
Community /Pin to ProfileBookmark

Character encoding on start of page…

Hey guys i just changed some of my pages to XHTML today but when i uploaded it i got this error:

[quote]

Parse error: parse error, unexpected T_STRING in /home/www/htmltips.awardspace.com/index.html on line 1

[/quote]

It is caused by this.

<?xml version=”1.0″ encoding=”us-ascii”?>

Anyone got any ideas?

Thankyou

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogFeb 19.2006 — That would appear to be a PHP error, and likely indicates that your web server has php short tags enabled and is therfore interpreting "<?" to indicate the start of a PHP code section, thus the parse error since the text that follows is not a valid PHP command. (If the file does not have a .php extension, then your webserver is probably configured to send all html pages through the PHP parser.) If you can't get the web host to turn off short tags, then you could work around it by changing that line to:
[code=php]
<?php echo '<?xml version="1.0" encoding="us-ascii"?>'; ?>
[/code]
Copy linkTweet thisAlerts:
@prowebmasterauthorFeb 19.2006 — NogDog,

Thankyou very much, an excellent reply and works good.
×

Success!

Help @prowebmaster spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...