Change HTML to PHP

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Post Reply
SQRL
Registered User
Posts: 1
Joined: Sat Sep 06, 2003 8:39 pm

Change HTML to PHP

Post by SQRL »

If i change the .html files extension to .php will it affect anything?

konigwolf
Registered User
Posts: 69
Joined: Tue Apr 22, 2003 10:22 pm
Location: Other World
Contact:

Re: Change HTML to PHP

Post by konigwolf »

Well that depends does your files use any php.

Roberdin
Registered User
Posts: 1546
Joined: Wed Apr 09, 2003 8:44 pm
Location: London, United Kingdom

Re: Change HTML to PHP

Post by Roberdin »

Yes of course it will. If you want to add php in your HTML templates yo uneed to change the template's property in the admin panel.
Rob

DeadEye686
Registered User
Posts: 448
Joined: Mon Jul 21, 2003 7:18 pm
Contact:

Re: Change HTML to PHP

Post by DeadEye686 »

[quote=\"konigwolf\"]Well that depends does your files use any php.[/quote]

It doesn't depend on that --- you can rename an html file to php, and it will still run perfectly. It will be parsed by the server first, adding a little load, but even if there's no php in there it won't matter. See Rob's answer for the correct one.

JAMMAN
Registered User
Posts: 100
Joined: Tue Jul 22, 2003 4:28 pm
Contact:

Re: Change HTML to PHP

Post by JAMMAN »

However, if there is a direct call to a page as .html, it will not work until you change the call for it to .php. Like a link ya know.

Roberdin
Registered User
Posts: 1546
Joined: Wed Apr 09, 2003 8:44 pm
Location: London, United Kingdom

Re: Change HTML to PHP

Post by Roberdin »

...which is why you just need to change that file's properties in the admin panel to parse for php code. Otherwise, the tempalte parser will escape all the php in the template.
Rob

JAMMAN
Registered User
Posts: 100
Joined: Tue Jul 22, 2003 4:28 pm
Contact:

Re: Change HTML to PHP

Post by JAMMAN »

Wasn't talking bulletin board software in particular, was talking general. :D

mercifull
Registered User
Posts: 42
Joined: Wed Apr 30, 2003 3:25 pm
Location: Frome, England Gender: Male
Contact:

Re: Change HTML to PHP

Post by mercifull »

a simple .html file with no dynamic code will rename to a .php with no problems what so ever

Roberdin
Registered User
Posts: 1546
Joined: Wed Apr 09, 2003 8:44 pm
Location: London, United Kingdom

Re: Change HTML to PHP

Post by Roberdin »

We're aware of taht (although if it has any XML declaration at the top which starts with <? then php gets confused). But you would need to change all the references to the file or you'd get a 404 when you tried to access the old file.
Rob

Post Reply