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

reading partial code from external site
Hi,

I am trying to write a script for my website to get an article from an external website.

Retrieving the 25 most recently added entries from all tables in a MySQL databas
Hello,

The code below works great. It creates a table that shows the 25 most recently added t

mr8m - reverse document
Friends,

I'm trying to reverse a document held by MIRO, but it reports the message balan

$_GET problem
Hi all,

Have a bit of a problem with a little piece of code, I am not sure if this should be

PHP code needed to get/post form fields and request mysql query results.
I'm new to PHP

I've created an html form to allow the user to request a basic telephone dire

php email checker
I am having alot of trouble finding info on how to do these email things. I need to do the following

how to export excel file in same server
My first post - php newbie, so appreciate your support.

I'm currently using headers to save w

Time-based image rotation script
I'm trying to write a PHP script that rotates an image based on what time of day it is. I want the

Packet Design
Hi All,
Im new about network programming and I want to design a protocol but I have some question

Newb advice
Hi all,

I'm a flash front end designer and I've taken on a project that needs some back end p

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