FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » PHP discussions » Can someone please explain to me that what is the advantage of using *.inc as extension name?
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Can someone please explain to me that what is the advantage of using *.inc as extension name? [message #23075] Thu, 03 March 2005 06:41 Go to next message
virileman is currently offline  virileman   Canada
Messages: 4
Registered: March 2005
Karma: 0
Junior Member
Hello

I would like to be a programmer with security in mind. There are many people/articles recommend that FUDforum is a secure forum. So, I look into the codes and try to learn something from it.

I have a question that *.inc file's full source can be download. I am wondering what the purpose is of coding like that? Could you please explain to me what is the advantage and disadvantage of using *.inc instead of *.php?

Thanks for your suggestions and hints.
Re: Can someone please explain to me that what is the advantage of using *.inc as extension name? [message #23080 is a reply to message #23075] Thu, 03 March 2005 15:05 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
When you install the forum you are asked for web path and data path and it is recommended that the data path now be browseable (outside of browseable dirs). If you want to keep the forum all in one dir that is fine too, as every non-direct access dir has .htaccess file with directive to deny access to all.

Even if the files are visible they do not contain any sensetive information like passwords etc...
Making them .php would be prolematic since some .inc have code that is executed in the main scope and if they were called .php, it would be executed.


FUDforum Core Developer
Re: Can someone please explain to me that what is the advantage of using *.inc as extension name? [message #24598 is a reply to message #23075] Fri, 06 May 2005 16:11 Go to previous messageGo to next message
danger is currently offline  danger   Slovakia
Messages: 11
Registered: May 2005
Location: Slovakia
Karma: 0
Junior Member
also, on my webserver, the *.inc files are blocked, so users can't view them, they just get 403 forbidden.
Re: Can someone please explain to me that what is the advantage of using *.inc as extension name? [message #24599 is a reply to message #24598] Fri, 06 May 2005 16:22 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
That is intended behavoir. The advantage of .inc files over .php files is that they are not executed automatically by PHP.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Ò»¸öSQLITEÊý¾ÝÀà
Next Topic: maillist.php script + mbox + mailman
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 22:13:26 GMT 2024

Total time taken to generate the page: 0.05611 seconds