Q&A: How do I make a directory or file only readable by scripts (like PHP)?

scripts
by Kmeron

Question by Simplicated: How do I make a directory or file only readable by scripts (like PHP)?
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?

Best answer:

Answer by Rockey
A .htaccess-file is a files that lets you do a whole lot off security tricks:

you can read about it here

http://users.telenet.be/ws36178/security/webmaster/htaccess.html

Know better? Leave your own answer in the comments!

Get the book now