Is there a way of stopping a viewer from looking at .txt files yet still aloowing a PHP script to acces them? In case it matters I'm using Easyphp as my server, I think it's got Apache in it.
Announcement
Collapse
No announcement yet.
Protecting .txt files
Collapse
X
-
Best way is to upload your txt file above your document root, and then just using an include() to get the file.
ie
/var/username/public_html
upload your txt file to
/var/username
then use include() to get the file using
include("/var/username/file.txt");
No one can get that file without hacking
Comment
Comment