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

SQL Injection
In my attempts to protect my database from mySQL injection I have created another problem for myself

Why will this program not run if the variables are not global?
Hey guys I have a kind of perplexing situation that is probably simple, but I can't seem to understa

please help me in this update statment
hi every one

if I have table and this data in it

id name
10

Coding Critique
I was hoping someone could take a second and look down my code and see if they see any problems with

MS Access data into a html table
Hi everyone, I am quite a novice at php but I have created some helpful scripts that fetch data
f

registration form
first time posting. did some searches but didnt find exactly what i am looking for. dont flame cause

How can I Compare two xml documents?
Hi all,

I am doing a POC for my project and I am using XE database 10g version.

Error when call dll from oracle
Hi all, please help me!

I have dll write C language, I want call it from oracle procedur

Issues: PHP Forms -Clearing
I've tried looking online before actually asking for help, but I've been looking for about the past

undefined offset help
Hi All,

I kept getting undefined offset PHP notice for a simple for loop. For eg
$va = arr

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