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

Varible in trigger - refering to correct schema
Hello

Im having some issues with my trigger.
What I want to do is call opon a differ

mails going in spam??
The mails I sent to folks in my database using mail(function) are going in spam??

Any idea ho

get url?
how do i get the url of the page i'm currently on, on my website.. i think its get header.. how do i

how do i make new line after *
First check this page here. and you see my report. Im pulling form a mysql db. I want to beable to m

How to secure my login data to my database?
Hi there,

It may be a stupid question but I don't know how to secure my login data to my data

Session
I am having a little trouble with a session. Not sure if it is my browser or what. I know I do not

Help with forum quoting?
Hi im working on a forum and I have alomost finished it but i want a user quote system like twitter

Only add new information from XML to MySQL
What I am doing, is taking a xml file, and adding the values to a database. However, what I want to

Convert array to string and write to csv file
I am looking to write a MySQL query to a csv file.

At the minute I:

check for the orig

storing video files into mysql in php
hi

i have my video files in my folder ,
i have to store the path of the videos into db an

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