Turning .html page into .php

Hi

I've created a site, and downloaded it, so I can upload it to my website.

Now I need 1 page to have a .php extension instead of a .html extension.

However, when I change the extension , I get an error message: 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_STRING in /home2/***/public_html/***/mypage.php on line 1294

How can I successfully change the extension?

1,841 Views
Message 1 of 2
Report
1 Best Answer
Square

Best Answer

Using .php as the extension on the file you downloaded means that you server is going to parse it as PHP rather than HTML.  There are coding conventions in HTML that would likely cause parsing errors, not to mention the file will be missing some of the basic ingredients of a PHP page.

One of our users might be able to help you with some custom coding, though I'd also recommend taking a look at some beginner guides on that from W3Schools to get a little more familiar with it yourself.

View Best Answer >

1,951 Views
Message 2 of 2
Report
1 REPLY 1
Square

Best Answer

Using .php as the extension on the file you downloaded means that you server is going to parse it as PHP rather than HTML.  There are coding conventions in HTML that would likely cause parsing errors, not to mention the file will be missing some of the basic ingredients of a PHP page.

One of our users might be able to help you with some custom coding, though I'd also recommend taking a look at some beginner guides on that from W3Schools to get a little more familiar with it yourself.

1,952 Views
Message 2 of 2
Report