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 some dates
I have a list of dates in an array:

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

Email to a friend script problems
I have this send-to-a-friend script with 2 issues:


1) When you open the form popup on a p

form variables from database help.
Hi all,

I would like to have a form that gives you options based on the results of an mysql q

PHP mail() rejected by SMTP
I'm currently working on a newsletter application which is installed on a windows 2003 server runnin

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

why this query can delete duplicates ?
why this query can delete duplicates ? Anybody can give me the detailed explanation ?

Tha

Material xxx does not exist in plant xxx
Dear All,

I am working for a steel project which is repetitive manufacturing.

LinkedList help
Ok so I just learned quickly about lists, so I have a not too hard project I think, but am having a

unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_
Can anyone view my code and tell me why im getting the error:
Parse error: syntax error, unexpect

insert PHP code into function
Hi,
I'm having problems when trying following:

I have:
Code: [Select]createBar("Do

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