Protect a directory but still allow PHP page to access?

  • Thread starter Thread starter vorxaw
  • Start date Start date
V

vorxaw

Guest
I have a php page that reads from a subfolder and displays images from it.
I want to protect the subfolder so people can't just type in the directory in their browser.
I have tried .htaccess, but that denies my php page from accessing the content as well.
Is there a way to protect it but allow just my php page to enter it?

Thanks
at Silas G:
so having my script php script call "system" will let it bypass the protection and reach the files? how do I go about that? thanks
 
Have your php script call "system", and use that call to copy the file to a temporary directory. Then display the file. Then, when the page is completely done loading, delete the file from the temporary directory.
 
Back
Top