I have written a php viewer that displays various text files. The text files are stored within subdirectories with the viewer in the root.
I would like for users to only view text files that they have rights to according to an .htaccess file located in the directory with the text file.
The problem is, everyone has to have rights to the viewer. Basically, I would like the php file to only be able to open the text file in the subdirectory if a valid user is logged in. Is there a way to do this using .htaccess, is there a better alternative, or do I need to create my own file access control code?
Any help would be appreciated.
I would like for users to only view text files that they have rights to according to an .htaccess file located in the directory with the text file.
The problem is, everyone has to have rights to the viewer. Basically, I would like the php file to only be able to open the text file in the subdirectory if a valid user is logged in. Is there a way to do this using .htaccess, is there a better alternative, or do I need to create my own file access control code?
Any help would be appreciated.