Hello.
This problem isnt strictly about PHP (but I will be able to fit the magical 3 letters in occasionally 😃 )
I have a PHP script that reads to contents of a file, and displays them on screen. The problem I have is that I dont want it anyone pointing their browser directly at the files directory and be able to read all of them. I need something like an 'Unauthourised Access' screen, even when they get the URL correct.
I have found 2 possibilities;
- CHMOD the folder (my windows windows test server doesnt support this, so I didnt look into it)
- .htaccess this looks like it could help, but there are so many different things to look at I'm not sure where to begin :queasy: I have tried a few things (.htpassword) but I havent yet been sucessfull.
If .htaccess is the way forwards, then could someone please say something relevant that I can stick in google and work it out?
Thank you 🙂
K.