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

parameter passing issue on function
Well I thought I had created a pretty slick web page, using ?page and $_GET to load pages which wher

Multi Level Array Problem
hi all,

For example I have array like below:

$temp = array(array('north america', 'us'

Session variable help
I'm having a very troubling issue. Maybe I'm just looking over something but I have looked at the co

Form validation with functions
Hi there

I am trying to make a very simple form validation function. I currently have the fol

Accessing element of object array
Hello

My object looks like this:


Array ( [0] => User Object ( [id] =>

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

I am using a WP plug-in to display prev

frames get header location..
i have two frames, one top, one bottom. how do i do a form on the bottom frame that gives me the ur

echo $rows help
Hi all,

Hopefully something simple that I don't know!

I have this:

Code: [Selec

Call db table from any PHP file
Hi,

I want to be able to call a database table that will be setup in another file called init

PHP IMAGE UPLOAD SCRIPT
Hi for the last week i have been looking for scripts that will upload a photo to a certain folder wh

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