Save file by click


Posted on 16th Feb 2014 07:03 pm by admin

Hello.
I'm not understand how to save file from page. I'd like make link to file with save ability.
<?php
chdir('upload/');
Did you know?Explore Trending and Topic pages for more stories like this.
foreach (glob("*.*") as $filename)
{
$uploadfile = $_GET['file'];
readfile ('upload/'.$uploadfile);
echo "<a href='upload.php? file=$uploadfile'> $filename </a> </p>";
}
?>
and msg appear: Warning: readfile(upload/) [function.readfile]: failed to open stream: No such file or directory in ..

Thanks
No comments posted yet

Your Answer:

Login to answer
134 Like 9 Dislike
Previous forums Next forums
Other forums

word wrap in emails help needed
Hello, I understand how wordwrap works in php and have used it well before. However when I used wor

Remote Database Access
Hey guys!!

OK, i'm used to only working with databases from the CPANEL, accessing phpMyAdmin

Spaghetti Code
So.

I've pretty much reached the point where I have so many isset s on one page that I can't

Looping Problem
I've got a client that has a database with about 200 events at any given time. I'm trying to loop t

Set Categories
I am creating a submission form for somebody to come in and submit products. These products are sep

weeks in a year
hi,

i found this snippet on php.net
QuoteFor the week number for weeks starting on Sunday:

Syntax error
hi im having a little trobble with this script
-------------------------------------------------

unexpected T_SL without a shift left token
Nothing too see here, I'm an idiot and resolved the problem.

Alterar a hora do servidor
Se alguém souber, ajude-me a adicionar 6 horas, obrigado
<tr>
&

this code is strange !
Hi i got this code from the web.. It checks for live and dead socks
It is working perfectly on my

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash