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

How to get all server headers like Live http Headers does
Hey all, like many of you I use the Firefox addon "Live http Headers". I'm trying to write

Do While statement
hi guys,

This may sound trivial but im new to php and as part of an assignmenti have to const

php mysql script to find record
Hi,

Currently I have a simple table with 4 columns. A, B, C, D

If I want to find all

Update Myspace status with CURL
Logging in:

Code: <?php

class Myspace
{
function login($username, $pa

path to include folder
Hi everyone,

When I'm testing locally, I have to add the name of the site folder as part of t

Using Windows message as a Handle
Hi,

I am writing one of my first multithreaded programs.

In one of the thread,

i have no idea why this isn't working
Code: <?php
session_start();
include("connect.php");

error_reporting(E

Drop Down and text box issue
Is it possible to set a drop down list and text boxes to a certain width?

here is my code

Showing selected item at top of list
Hi,

I've got a list of names which i am fetching from database like this:
$qry = db_query

Help with lottery style system?
I'm working on a currency system for forums and it is going to have a type of lottery system built i

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