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

php libs/ browsercap.in
ok i have a host that refuses to stay current. they control my php settings and libs. is there a way

Multi-image upload problems
Lets see if I can get some help on this one. Can anyone show me what I am doing wrong here. I'm just

ImageCreate()
When I create an image and add text to it I want my text to be replaced with a PNG image, because th

Unable to customise toolbar in FCK
Blank record injected into database
I always found several blank records inside my database, although $SESSION is required to insert the

Format String help
I have a textbox where a person enters an application number. the application number is 10 characte

Cannot Display Array from Select Statement + Login question
Hi,
I'm new to PHP but so far so goog. I was assigend a project and I'm very close to completion.

Website Direction...
I recently used this code to try and make it so the page loads as http://www.domain.com/ when you ty

Printer configuration
Hi All,
Suppose one of the user deleted the printer settings unfortunatly ,then what is the pro

count only commas outside parenteses
I have a sql table containing
id - query - query name
the first page contains a drop down men

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