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

strtotime issue
Hey all,

I'm playing around with some code, and basically the idea is:

Person changes

Warehouse Management
Hi,

On our system, we have two storage locations ( A and B ) where A is the main factory

Must-Know Topics of PHP
Can you guys list the must-know topics of PHP. I am still a learner and I am trying to cover most of

Something Non-Traditional. Can we solve?
I have an idea for an application here. It's mostly flash, but it couldn't work without a somewhat n

PHP submit form script causing blank page
Im trying to submit a form using this script, however nothing shows up on the page, does anyone know

switch not getting value
what am i doing wrong?
i want to populate the country list according to the category
i want to

How can I get my program to read a larger array ??
Hi:

I have this program that reads from an array to do calculations. The array are just t

Strip Slashes Help
I've got a script that i've downloaded of the net to edit multiple fields from my sql database, and

newbie error
what is wrong with this code ?

<html>
<body>

<?

urldecode question
How would I format this line of code properly?

<?php echo urldecode($_GET['Title']); ?

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