Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Changing my index.html to index.php
Old 03-01-2010, 07:05 AM Changing my index.html to index.php
TheDon's Avatar
Extreme Talker

Posts: 216
Name: Don
Trades: 0
Hi All,
I hope the weather is as good there as it is here.
I am a bit of a noob to PHP and webdesigning and trying to change my index.html to index.php.
The reason I am doing this is that I want to manage my navigation bars in other nav.php file which will be great as I just change one page and it updates all the other nav bars on my other pages.
I have got that working great, but have another problem.

When I took my index.html off my server and replaced it with my index.php I got the following error

Quote:
Parse error: syntax error, unexpected T_STRING in /home/thaidisc/public_html/index.php on line 1
In line one of my index.php I have
Quote:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Now I am guessing this is a problem, so how would I correct this?
__________________
[
Please login or register to view this content. Registration is FREE
] [
Please login or register to view this content. Registration is FREE
] [
Please login or register to view this content. Registration is FREE
]
TheDon is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-01-2010, 07:51 AM Re: Changing my index.html to index.php
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
<? echo ("<?xml version="1.0" encoding="utf-8"?>") ?>

or change your php.ini to disallow the "short_open_tag" so the opening PHP delimiter must be "<?php" rather than "<?"
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 03-01-2010, 07:53 AM Re: Changing my index.html to index.php
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
BTW

Having the XML declaration WILL cause "issues" with IE as it will "break" the DTD and put IE into "quirks mode"
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Changing my index.html to index.php
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.12933 seconds with 12 queries