April 29th, 2012, 11:40 PM
My webserver has an ftp section in it. I am trying to make an Excel file available for download. Where an I going wrong?
$source = "firstname.lastname@example.org/ftpfilepath/file.xlsm";
$target = fopen("c:/file.xlsm", "w");
$conn = ftp_connect("ftp.webserver.com") or die("Could not connect");
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<div class = "content" id ="download">
<h2><a href="<?php echo $_SESSION['ftpdownload']; ?>">file.xlsm</a></h2>
April 30th, 2012, 01:46 AM
Available for download... by the user?
April 30th, 2012, 02:03 AM
Yes by user. I am not certain this will work. My webhost makes ftp site available but I am sure how the user actually can download the file.
Last edited by Philosophaie; April 30th, 2012 at 02:07 AM.
April 30th, 2012, 02:35 AM
You can't download it for them. They have to choose to do so by visiting the file directly (and then their browser will do what it wants).
I'm pretty sure every single major browser supports (read-only) FTP access. Just give them an FTP link.