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

need Array help
This is what I have to do.
$teamname[1] = "Red Sox"
$teamname[2] = "Gian

Solution to the FindControl problem
I have seen may posts about having problems with the FindControl method. Most seem to come about bec

2 things: enter doesn't work in IE & empty form
i have this search form that works well except for 2 things.

1) on IE when i hit enter instea

Check something, wait, check again, do something!
Hi guys.

I wonder if someone can help me with this.

Basically, what I want to do is (

Keeping data in form
How can I keep whatever I write in the form?

Upload Code Help
Hi everyone I need some help with a bit of code ive been working with for a while. I am completely s

upload only text files
hi guys i want to upload only text like like (pdf,note pad and ofiice files) so can any one please t

sapgui f4 help last search
I know this has to be simople. One user (maybe more) does not have the "last search saved" from the

Not showing whole name with mail () script
I sent up a simple mail form with the PHP mail() script. One problem is when it sends an email with

problem with sql querry in php script
Hello guys,

What I want to do is I want to read out a csv file and then but te conent ot the

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