Jump to content

wat is an *.inc for? how to create it?


zgkhoo

Recommended Posts

an inc file is just another php file but with the inc extension. You shouldn't use inc as your file extension unless you are sure that your php will process them, otherwise people may be able to view your script. You should probably use something like "include.inc.php" instead.

Link to comment
Share on other sites

an inc file is just another php file but with the inc extension. You shouldn't use inc as your file extension unless you are sure that your php will process them, otherwise people may be able to view your script. You should probably use something like "include.inc.php" instead.

 

It isnt' technically a "php file"  it is a file in general.  You can't be any more descriptive than a file, as the extension does not have any certified default application such as a .dll file or a .ini or a .php or .html, .js etc.  It is an arbitrary extension generally used for inclusion files similar to a library file in a C/C++ development.  Its extension has no correlation to the content to it, but it is assumed that it is an include file containing data that will be support to php.  I could call it a .animal file if I wanted or a .stupidfile it doesn't matter (yes there is a limit to an extension size that is readable by most systems I know).

 

I'm just trying to state it is nothing more that data assigned to a location that has a defined character.  The applications of this data are unknown, until it is used someway.  It is a dependent file as it can not run on its own 90% of the time.

 

As stated above it is dangerous using the disambiguous file extensions as the default settings in most apache configs is to simply apply a generic text file assocation with a file that has an unassigned extension in a public folder, allowing as stated above unprocessed viewing of what you think is protected.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.