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

MySQL-PHP Query Results Help
Hello all. I'm hoping to be able to get some help in solving a problem with query/rowcount output. I

Delete all from a table
I can not get the following code to work. If I run the sql statement in the db it will delete all t

Keeping data in form
How can I keep whatever I write in the form?

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

Remote Database Access
Hey guys!!

OK, i'm used to only working with databases from the CPANEL, accessing phpMyAdmin

sql problems
I am having a small problem with my sql statement. it is inserting into 4 of the fields.

fie

How to Create a Dynamic table
col1 col2 date1 date2 date3 date4..........
a b v1 v2 v3 v4

Do not allow posting of whitespace
Currently the script below works if the user does not type a name/message, but if i create a whitesp

Echoing ASCII code
I have a php page that splits a string into chars and then echoes the ASCII code for each char. I'm

PayPal Redirect Issue
When I have my paypal button set so that is redirects to http://empiremarketing.ca/order.php,it work

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