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

Content-Disposition: attachment; filename=... not working as i thought it should
taken the following code from the php.net site the script is not working.

what is not happeni

Query issues
I probably have this setup wrong well I know I do because nothing is showing up now. What I want is

Multiple websites question.
Hi, does php have any functionality that enables a programmer to extract information from a website

PHP Include not working
The website is http://www.grlistingservices.com

The code block is as follows:

<

Automatic Webpage ??
I have a page www.mysite.com/test.php with a
<form>
<textarea name=&q

I face problems to extract data from one table and insert it in another one
Hi,

For modifications, I have to extract data from one table and insert it in another one

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

Two fgetcsv related questions ;D
First of im trying to get a file from a merchants server but the directory is protected, I know the

a function to check directory depth
I'm working on a php script to upload files in to a set directory.
the user can select to upload

Changing files over
Just thought I'd start with the new forums looking really nice .

Ok basically I've made this

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