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/');
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

Calculus Help (and by help I mean homework)
Hrmmm, I hate posting about math homework, partly because it's homework, and partly because I hate w

How to give the privillege for triggers?
Hi,

How to give the privillage for triggers to particular user?

Please let me

Error with login script
I am getting an error with my login script:

Error:
Code: Warning: Cannot modify header inf

Help with file_get_html
The following code gives the expected results:

<html>
<head&g

Weird Problem with curl while sending data
I am facing a weird problem with sending data to a site via curl.

If i send the value by this

apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?

OPINIONS WANTED
This is my login page code, and I want your opinion on it please!

Code: // Login ~ CHECKS

Show message after entering data
Hello Colleagues

I would like to display messages after entering the data example: "
dat

temporary objects
Until now i thought every temporary object in C++ is created as constant. I'm wondering why my compi

Code error with Index.php
Error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runevid/public_

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