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

problems with php variables in mysql query
i can't seem to get the following query to work.

select $q1c from $vote_rate where id = $re

function not returning the correct value
I have a program that needs to return a value from a function. I have an output statement inside the

Creating web pages by php
Hello again,
I was just wondering us there a way to use a php script to create a new web page. I

ereg_replace issue
hi there people

i have this code happening with regards to my wamp server. is this something

IS Retail & Manufacturing
Hi

Can IS Retail and Manufacturing activities be done in same instance ie. in same client

php automatically escaping single quotes
I'm trying to test out my security a bit and I've noticed that php is escaping my single quotes. For

Securing a user input - need some confirmation
Hello All,

I am in the process of recoding a large proportion of an e-commerce site, one of t

php call servlet
I have done a php backup application .
So there is a form that user pick some files to zip and d

error reporting
hey everyone

I have a production server in which I want error reporting but only on some page

type check while uploading
Hi Everyone,

How can I check the exact type of a file while uploading on my site?

Here

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