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

ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c

question about header() security
is is safe to just use the header() function to redirect someone if they are, say, not logged in? or

Consuming MII WebService in Java WebDynpro
Hello,

We are facing a strange situation...

We define a transaction in MII to

Security Exception on pages using AJAX
I am getting the exception: attempted to perform an operation not allowed by the security policy on

Online Event Ticket Sales
Has anyone wrote a script for online tickets sales?

I have been googling and found lots of th

Displaying a record from mysql in a simple swf file
Hi,

I have a mysql database containing information I would like to display in my swf.

Strange cookie problem. setcookie dependant on where user was directed from?
Hello,

I have a website that sets a cookie when a user visits the website. The cookie holds a

Change of partner analyse in sales orders
Hello,

I changed the partner analyse for sales orders and added a new mandatory partnerro

MySQL Primary key gap
Alright, so I have a table with 26 entries in it (id, filename, caption) for my image randomiser (ht

Help with forum quoting?
Hi im working on a forum and I have alomost finished it but i want a user quote system like twitter

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