/    Sign up×
Community /Pin to ProfileBookmark

whats the difference between .php and .html

I have seen lots of web pages that have been named index.php rather then index.html.

I would like to know what the difference is and whether these people have certain features on that page so it needs to be called .php instead of .html.

Just a simple explanation would be ok.

Thanks

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@pyroDec 01.2003 — You asked for simple, so that's what you get... ?

Pages with a .php extention will be processed as PHP, and thus can contain PHP code. Pages with a .html extention generally are not processed as PHP (they can be made to, if one wants to) and cannot contain PHP code.
Copy linkTweet thisAlerts:
@dreamcatcherDec 01.2003 — You can edit your .htaccess file so that your server will parse .html files for PHP content. Think its something like:

[b]AddType application/x-httpd-php .php .html[/b]

Although I`m not 100% sure.

?
Copy linkTweet thisAlerts:
@pyroDec 01.2003 — Yep, if you are on an Apache server that should work...
[i]Originally posted by pyro [/i]

[B](they can be made to, if one wants to)[/B][/QUOTE]

I think I'd just leave it as .php though...
×

Success!

Help @b1b2b3 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.27,
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,
)...