By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,661 Members | 779 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,661 IT Pros & Developers. It's quick & easy.

Download files to local computer

P: 43
using php5, I download files :

******** downloadfile.php
$fileContent = @mysql_result($result1,$i,"gdata");

$ourFileName = "$gribname";
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");
fwrite($ourFileHandle, $fileContent);
fflush($ourFileHandle);
fclose($ourFileHandle);
*********

but the file downloaded to the same directory with this downloadfile.php page,
how to specify a directory for the files downloaded ??
and all these files go to the computer in which the php pages in, how to download files to local computer and download them to a certain directory specified by user.

many thanks.
Tanya
Apr 26 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.