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

Preg_match unknown modifyer
Hello,

Im trying to write a little script for my forums i need to get the reply from my forum

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

Procedure with variable number of columns
Hi, I have a procedure that looks like this:

PROCEDURE PROC(p_cursor OUT sys_refcurso

Help with some dates
I have a list of dates in an array:

$mondays = array(
strtotime("October 12, 2009

How do I use ValidatorCallout extender in Login control?
Hi,I'd like to customize the look and feel of the login control a little bit. One thing I'd love to

Update not working ... please help
Hi,

I am trying to update a row using an edit form by passing id of the row .. but it is not

PHP Programming error. Please help!
Hi there,

Am making a website for a friend and have encountered a problem that i need fixing

Beginner PHP code help
Hi I'm new to php but if someone could please read the question below and help it would be great.

writing a screen scraper
Hello,

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

Echoing If Function?
A script I am using has If statements in the comments form to basically tell the form what to do. Cu

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