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

Home » Imported messages » comp.lang.php » self-modifying program
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: self-modifying program [message #174364 is a reply to message #174363] Wed, 08 June 2011 13:07 Go to previous messageGo to previous message
Michael Fesser is currently offline  Michael Fesser
Messages: 215
Registered: September 2010
Karma:
Senior Member
.oO(jeff)

> On 6/8/2011 7:50 AM, Michael Fesser wrote:
>> .oO(Jivanmukta)
>>
>>>> Why do you need that the file is reachable through the web browser?
>>>
>>> BTW, my website contains also "include" folder (for class.X.php,
>>> lib.X.php). Should it be placed inside public_html?
>>
>> No, such scripts and configuration files should be stored outside the
>> document root.
>
> Why?

Security.

> The public sees nothing if they hit the script.

If it's not intended to be reachable by a URL, then why put it there at
all? You not only have to trust the server to always parse such files,
usually you also have to protect that folder with an .htaccess file.

It's much easier, safer and more reliable to keep such files outside the
public folder.

> Not that I have a problem with putting such files outside public, but
> it's not uncommon to FTP to a server and just have the html root
> visible.

I would not choose such a host, because I definitely need a place
outside the document root. It's not only for my scripts, but for example
also for documents and images which require authorization - they are
stored outside the public folder and are served by a script. With just
the public folder I would have to rely on .htaccess files and HTTP
authentication, which would be much less flexible.

Micha
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: We wholesale Amazon Kindle/ Monster Beats / Ipods / Apple products of all types
Next Topic: [newbie] datetime issues
Goto Forum:
  

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

Current Time: Fri Nov 29 21:05:03 GMT 2024

Total time taken to generate the page: 0.04316 seconds