I have a server running apache, which has a few mapped Network drives.
and i have a client, which needs to download a file from those drives.
i am able to create a file of the same filename, and it downloads, but with an error for its content.
the error(or contents of the file) is:
-----------------
<html>
<br />
<b>Warning</b>: readfile("mapped drive"/Dev-Cpp\Templates/ConsoleApp_c.txt) [<a href='function.readfile'>function.readfile</a>]: failed to open stream: No such file or directory in <b>"serverroot"\wamp\www\download1.php</b> on line <b>9</b><br />
</html>
---------------------
my wamp/www/download1.php is:
<html>
<?php
$filename=$_GET["filename"];
header("Content-Description: File Transfer");
header("Content-type: application/download");
header("Content-Disposition:attachment;filename=".basename($filename));
readfile($filename);
?>
</html>
-------------------------------------------------
The filename is being passed from a results page using the get method which is why GET[filename] is used. i am clueless on how to open that file and read from it.
downloading from the server's mapped drive
Moderator: General Moderators