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

Oracle11g Patch issue
Hi all,

I'm getting the following error while installing Oracle11g Patch 11.1.0.7.0 on IBM-AI

Need help with an email blocker for a guessbook
I am new with php and here is a simple guessbook page but I am being hit with spam from a group of t

Problem with the Update command used with a sqldataadapter
I'm connected to a database on an SQL Server and I'm using a sqldataadapter, sqlconnection, sqldatas

PHP webpage & array print issue
I have this code running, and it works perfectly … however, see my bottom bit about what I see

Syntax Help
I'm trying to make a form that edits a php file which contains config settings. I'm using strings t

Code clarification
Hi

In the following code what could be the "search_print()" and where it could be

Add User script "Could not execute query"
This should be an easy script but I can't get it to run. Can someone please help me?

<

DOMDocument
Hello All,

I need to take an XML document, modify some of the nodes in it and then perform a

PHP search multiple input field box help
I am having a problem with my search script. At current it will simply search by a selected date whi

empty() error
Why does

Code: empty($USER_ID = $_SESSION["USER_ID"])
create this error...

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