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

WS-Security PL/SQL Forms
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Prod
PL/SQL Release 10.2.0.2.0 - P

My query is being run with no results.
I have this.

Code: function DropUser($duser_id, $user_email, $user_username) {

Update Database
Hi All,


I have a problem with this:

Code: [Select]<?php
session_start();

SHOW TABLES Help
Hi all

I have the following

Code: [Select]<?php
$sql = "SHOW TABLES&quo

Any help with my email script?
I have an email script, I have not tested it, although someone tested it for me and said it worked f

Inserting the current date/time while submitting the forum
What do I need to add below to update the current date/time? I have a field in the database called d

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

remove trailing slash from array
I have the following array which contains trailing slashes I need to remove. What is the best way to

PHP Tab Control
Hi All,

I would like to have PHP tab control with/without Javascript.

But I want to r

asp authentication problem
Hello all, I want to use the asp authentication (from asp.net configuration) in my web site. there

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