Reply to Re: [PHP] .INC files

Your name:

Reply:


Posted by Rasmus Lerdorf on 10/21/59 11:17

Martin Zvarik wrote:
> Hi,
> I saw files like "file.inc.php" and "file.inc"
>
> What is the *.inc suffix good for ?

I don't see the point in file.inc.php, but file.inc is something I use
all the time to indicate that a file is designed to be included and not
accessed directly. Then I have an Apache config rule that prevents
direct access to the file which looks like this:

<Files ~ "\.inc$">
Order allow,deny
Deny from all
</Files>

Without this rule people would be able to access the .inc file directly
and since PHP won't parse it, the raw source code would be visible which
could be a security problem. If you prevent this simply by putting .php
onto the end of your include files, you could have a different security
problem in that files designed to be included could be run out of their
include context and could potentially do something unexpected.

-Rasmus

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация