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

Help with echo()
I'm having some problems with this code:

Code: echo '
<A HREF="jav

PHP, Arrays & A Lot Of Confusion
I've been doing basic PHP work on sites for a few years now, but I've never been tempted to learn ho

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

Problem displaying "scraped" XML data
I'm basicly having trouble displaying XML data scraped from an URL using cURL.

What the code

Download Image from URL and Upload it
Ok, I have been googling for the last 1/2 hour trying to figure this out, Most likely I'm just not s

Using Windows message as a Handle
Hi,

I am writing one of my first multithreaded programs.

In one of the thread,

send message to the java application
Oracle 10g with Windows platform.

I have a java application that periodically pings the d

Post, not working, please help
The error is:
Method Not Allowed
The requested method POST is not allowed for the URL /student

date("now") prints out wrong date ?
Hi Guys
Anyone know why and how I can fix it ?

writing a screen scraper
Hello,

I'm writing a screen scraper application and want to be able to get absolute addresses

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