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/');
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

A little help needed passing hidden values to next page
I have a page that has hidden values in a form.

example
Code: <input name='signupID

mysq_num_rows
Hi,

I want to use:

Code: if(mysql_num_rows($ergebnis2)==2)
how can the value 2, be

How to give the privillege for triggers?
Hi,

How to give the privillage for triggers to particular user?

Please let me

mails going in spam??
The mails I sent to folks in my database using mail(function) are going in spam??

Any idea ho

Showing selected item at top of list
Hi,

I've got a list of names which i am fetching from database like this:
$qry = db_query

DATEDIFF Question
First time post, and of course it is a help question.

I am using a WP plug-in to display prev

PHP code for a proxy
I was wondering which function I could use to create an online proxy tool. I was thinking cURL would

HTML Email rec'd as Source Code
The code does create and send the email successfully. However, the message shows as html code and n

can i optmize image to 50% quality before uploading 2 server
Hi there

i have jus written a php program to upload and display images but when i try to uplo

switch form actions? not working
i want on submit to go to different pages according to the CatID

Code: <?php $CatID=$_

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