You are here: Re: I can upload...but how do I download a file? « All PHP « IT news, forums, messages
Re: I can upload...but how do I download a file?

Posted by Justice on 10/10/73 11:21

Wot! No reply on this query!

Ok, have I got it right? There is a file on your server and you want a user
to be able to download it?

let's say the file is $doc in folder /download/

echo "<a href=/download/" . $doc . ">" . $doc . "</a><br>";

He will need to hi-lite with the right mouse button and "Save As ..." in
internet explorer.

But this too simple so I guess you mean something different.

John





"toedipper" <send_rubbish_here734@hotmail.com> wrote in message
news:EAgBe.214$s9.67@newsfe3-gui.ntli.net...
> Hello,
>
> The following code grabs the url of a file location on the net from a db
> on my server for a file download.
>
>
> // connection to grab url of the file
> mysql_select_db($database_local, $local);
> $query_dllink = sprintf("SELECT dllink FROM software WHERE swid =
> %s",$colname_dllink);
> $dllink = mysql_query($query_dllink, $local) or die(mysql_error());
> $row_dllink = mysql_fetch_assoc($dllink);
> $totalRows_dllink = mysql_num_rows($dllink);
> ?>
>
> So I've gone and grabbed the location.
>
> I then stick this following bit in between the header sections on my
> html page, note I am trying to kick of the download.
>
> <? echo "<META HTTP-EQUIV=\"refresh\" CONTENT=\"6;
> URL=http://\"$row_dllink\" \">"; ?>
>
> This all work on paper but nothing happens. Basically I want to grab a
> file location url from my db and then start to download that file to the
> user. I am not sure if I am doing this right at all so help would be
> appreciated.
>
> Any ideas?
>
> tia.
>
> td.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация