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

Login Script Issues
I am using a script I got from http://phpsense.com/php/php-login-script.html in order to allow peopl

Query issues
I probably have this setup wrong well I know I do because nothing is showing up now. What I want is

Help =( !! Upload Pics [PHP script]
Hello
I need help with a php script [MULTIPLE UPLOAD IMAGES] , where I want to add a feature (wat

Undefined Variable: PHP_SELF, pls help
Hi,

Im a newbie on PHP / MySQL programming and Im running a script to search one field on my

Posting to another Site?
I have software that people install.
When they install it, is there a way to make it post their d

Return X values where an ID number doesnt matter
Well as for subject heading, thats the best i could think of.

Currently im having a problem w

Help with PHP and checkboxes
I am posting this for a friend of mine, i wrote a small script for her to process her form data to a

displaying email without attracting a ton of spam
Hello,

this is maybe the wrong place to ask.
How would you display an email address on a w

setcookie and isset($_COOKIE(name)) seem very finnicky.
I'm currently playing around with a user system with login and registration. I'm trying to use cooki

connect() succeeds but accept() does not?
Please help me with this problem. I'm working on a time-sensitive project where I'm using TCP socket

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