PHP .inc or .php

Fri. June 11, 2010
Categories: Information, Programming
Tags: , ,

When including files, I have seen people use inc file extensions and most people using php. For php it is best to not use the inc extension as the code can be viewed in plain text. This is because most servers are set up to display it, it is used for server side include for HTML ^_^

Random bit of information.
Pete

One Response to “PHP .inc or .php”

  1. jamesravey Says:

    True enough, .inc files present a serious threat to the security of your site unless your server is set up to interpret them as PHP or deny access to them.

    Check out how to use .htaccess files to deny access to specific files:
    http://www.htpasswdgenerator.com/apache/htaccess.html#6

Comments