Jump to content

General Question


Gmunky

Recommended Posts

Is there a difference between naming a file that is to be included in a script with a .php or .inc extension?

For intance, if I want to include a script with my database connection info, does it matter if I use

include ("db.php"); or include ("db.inc"); ? is one more secure than the other? Thanks for the info!

 

Link to comment
https://forums.phpfreaks.com/topic/54510-general-question/
Share on other sites

If you connecting to the database using PHP, then I would assume it would require the .php extension. I'm not 100% sure though.

I'm sure that you could include an .inc file inside a .php file. I know you can include other filetypes, such as .txt, so I see no reason why you shouldn't be able to include .inc.

 

I don't know about .inc files though, so I can't comment on security issues..

Link to comment
https://forums.phpfreaks.com/topic/54510-general-question/#findComment-269616
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.