hello everyone,
sorry for a noob question, but i was wondering if I could chmod a txt file (eg. test.txt) to make it unreadable for everyone trying to get it via http:
http://my.domain.com/somefolder/test.txt
so it would display a 403 forbidden error. but still i'd like to be able to get its contents in a php script.
i tried a few combinations but i ended up with being able to read it via http AND php script, or not being able to read it at all.
any solutions?
winxp.tar.gz
chmod newbie question
Moderator: General Moderators
Re: chmod newbie question
It looks like you're doing it from the opposite direction, and since usually PHP runs as Apache module, denying Apache you deny PHP as well.
Try the reverse: deny HTTP access with .htaccess (RTF
Try the reverse: deny HTTP access with .htaccess (RTF
Code: Select all
M), and leave the file with its regular chmod bits so the PHP can read it.