Re: fopen over a network
| From: | Leif K-Brooks | Date: | Wed, 04 Dec 2002 10:55:17 +0000 |
| Subject: | Re: fopen over a network | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-126967@lists.php.net to get a copy of this message | ||
Link them to a page like this to download the file:
<?php
header("Content-type: application/octet-stream");
//Code to display file
?>
Dara Dowd wrote:
Hello, I'd like a user to be able download a file from a file server on my LAN. Using <a href="file://server/directory/filename"> works ok, but this simply displays the file in the browser and I want to force the download dialog box to appear. So now i have <a href="download.php?file=filename">, and i want to do something like fopen("file://server/directory/filename",rb") but i just get an invalid argument warning. Am i on the right track?Is there a way around this? Cheers, Dara-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.