Simplicated asked:
I have a directory with files which are strictly confidential and should only be read by my PHP script. What should I do so that others can’t read it?
I have a directory with files which are strictly confidential and should only be read by my PHP script. What should I do so that others can’t read it?


2 Comments to 'How do I make a directory or file only readable by scripts (like PHP)?'
April 30, 2010
A .htaccess-file is a files that lets you do a whole lot off security tricks:
you can read about it here
May 2, 2010
If you have sensitive files that should be accessible only by scripts, put them somewhere on the server other than the web root. Your scripts will still be able to access them, but nobody can pull them off the web.
/
– /htdocs
– — /www.site.com
– /securedocs