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

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

JSON SORT WITH PHP
I have two products that I want to sort by say "Id:17, value: xxx" using php
The page w

Upload simple problem
Really confused!! I run once and it worked, but when i tried today...it didn't work

Which par

CRM?
I think that's what they're called. Customer Management System? Anyway. Is there any good free ones

Storing user data help?
Hey Guys,

I'm not use if this question is to broad but I can always give you more informatio

calendar dates and hours compare problem
i have a calendar in wordpress, everything works great except that i can make 2 meetings at the same

Stats of viewers
Hello. I have a website in php and people can login. I want to make an admin control panel where u c

update the selected existing records of database
Hi frndz,
I am new to php and get stuck....

Edit.php > Update.php > Updatea

Form Help
Here is the form:

Line number On/Off | Expand/Contract<? include("../include/sess

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

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