php script to download pdf files
Posted: Mon Oct 03, 2011 2:20 pm
I have a pdf directory where all the pdf's are chmod 640.
It's set this way so that people can't access the pdfs directly like this.
Example: www.mydomain.com/pdf/pdf.pdf
I have a php download script in the pdf directory to download the files, but it doesn't work with chmod 640.
I get the following error:
[function.fopen]: failed to open stream: Permission denied
I'm assuming i need the script to run as the owner or group but can't figure how to do it.
Any suggestions?
Thanks in advance.
~D
It's set this way so that people can't access the pdfs directly like this.
Example: www.mydomain.com/pdf/pdf.pdf
I have a php download script in the pdf directory to download the files, but it doesn't work with chmod 640.
I get the following error:
[function.fopen]: failed to open stream: Permission denied
I'm assuming i need the script to run as the owner or group but can't figure how to do it.
Any suggestions?
Thanks in advance.
~D