Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

which extension for php files ??

Status
Not open for further replies.

hos2

Programmer
May 6, 2002
418
NL
I was wondering what the difference is between
index.php and index.php3 ??

what file extension is now commonly used for php files ???

perhaps a silly question but I can't find the answer to it
 
.php is the most commonly used php extension, allthough some sites do use .php3.

I think the difference is some library extensions, but not sure.

Regards,

Martin

Computing Help And Info:
 
Now PHP manuals use .php (and sometimes .inc for included files).
The php3 extension comes from the past...
Really you may set up your web-server+PHP configuration to recognize any file extensions as PHP (why?)...
 
php3 AFAIK is just the historical reflection that there was PHP v.3.
In my opinion en experience it seems best to just limit yourself to one extension, e.g. php. A number of extensions that are parsed could decrease the servers efficiency since files might be parsed that don't have any PHP. One extension also makes clear that all other files that contain PHP will be served as plain text - careful with backup files like with EMACS, foo.php~, they could expose code.
 
OK thanks, I was always using php3 and I didn't know why I was using this instead of .php
:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top