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

xApp Analytics in BI 7.0
Dear all,

I am trying to implement xApp Analytics in BI 7.0. After I installed the analyt

Multiple Options for a Single Page
For this example I want to use the Handlers option which is under Fed Admin and all the related codi

Need understanding of this bit of code
Code: <?php
// WHERE clause filters
$arrSQLFilters = array();

//

[function.file]: failed to open stream: No such file or directory
Okay I wrote this little script to upload a csv file that is located on my webhosts server to a mysq

Adding Different Numbers From MySQL
Basically I have a mysql database with a couple prices as the following:

9.99
9.99
9.99

problem with array - multilingual page
this is my test page :
Code: <?php
if(isset($_GET['lang'])) {
if($_GET['la

PHP5 - Verifying a secure mail is secure
I need to send an e-mail from a form to a external department and because it contains personal custo

Quick Syntax Question
Hi folks,

I'm getting the following error: "unexpected T_LNUMBER". I'm trying to b

timed header image rotation
I have a joomla site and I was trying to setup a rotating image based on timing NOT just refreshing

php/xmlrpc class issue
I am working on xml-rpc in php to start with.

I have a class that only has variables defined

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