php scripts and file permissions
Moderator: General Moderators
php scripts and file permissions
I've got a php script that reads data from a text file. I'd like the text file to not be visible to anyone who types in the url, but the php script needs to have access to it. What would the permissions be on such a file?
Last edited by nigma on Thu Mar 17, 2005 10:10 pm, edited 1 time in total.
Re: php scripts and protected files
just save your text files outside your webroot; your php script will have direct access to the text files; hence, to view the files by users, they must execute your php script which yields your desired outputs.nigma wrote:I've got a php script that reads data from a text file. I'd like the text file to not be visible to anyone who types in the url, but the php script needs to have access to it. What would the permissions be on such a file?