Hi,
I have got my code to display a list of files on my ftp server but i can’t work out how to get the file name
with the mouse cursor so i can create a download link and been a newbie well so any help would be apprieciated.
This is my main code
[php]
if (isset($_SESSION[‘username’]))
{
echo $_SESSION[‘fullname’];
}
else
{
echo ‘Not logged in’;
}
?>
$ftpServer = “ftp.microinovations.co.uk”;
$ftpUser = $_SESSION[‘username’];
$ftpPass = $_SESSION[‘password’];
$conn = @ftp_connect($ftpServer)
or die(“Couldn’t connect to FTP server”);
$login = @ftp_login($conn,$ftpUser,$ftpPass)
or die(“Login credentials were rejected”);
$workingDir = ftp_pwd($conn);
$fList = @ftp_nlist($conn, $workingDir);
if(is_array($fList))
{
for($i = 0; $i < sizeof($fList); $i++)
{
echo $fList[$i] . “
”;
}
}
else
{
echo “$workingDir contains no files.”;
}
?>
[/php]