Re: Problems downloading a PDF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mário Gamito wrote:

To prevent people to insert the full URL to the documents, i moved them outside Apache's DocumentRooot, which is /var/www.

My site is in /var/www/telbit and i put the PDFs in /var/www

I've coded in order to do the trick, but it's failing.
I can't get the name of the file.

You don't need to basename() it, you already know what the filename is, because it was requested via $_GET['file'].

I would insert a file_exist check before you try and send it. It might give you the cause of your problem.

Cheers,

Rich
--
Zend Certified Engineer
http://www.corephp.co.uk

"Never trust a computer you can't throw out of a window"

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux