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

Filename and Line Number Custom Error
I have a class, with a method that accepts 2 parameters. I would like to output error messages.

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

Deleting pointers froms vector?
Hi. I have a vector filled with pointers and I want to delete the pointers. I could do a loop and do

echo $rows help
Hi all,

Hopefully something simple that I don't know!

I have this:

Code: [Selec

Different actions for different parts of a string
<?php
function dosomething($string, $else = '') {
if (empty($else))
$string

calculator
I can't figure out why this code doesn't work. No error messages. Page loads.

Code: <

Sendmail.php - heading error following check_input
Hi,

I would greatly appreciate some help? I am brand new to PHP and have been searching and e

Is STL important?
I'm just starting programming and I've made it until the Standart Template Library. But the chapter

button help
i originally had this but realised it is much easier to have a button.

Code: <?php

Setting condidtions for an input box
Hi all,

I would like to set a condition in a txt box that says the number a user enters has t

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