How would you impletement download and upload a file in php
Answer Posted / vijaya
refer this link for uploading
http://php-mysql-javascript-css.blogspot.com/
for files downloading you can use headers .
<?php
// We'll be outputting a PDF
header('Content-type: application/pdf');
// It will be called downloaded.pdf
header('Content-Disposition: attachment;
filename="downloaded.pdf"');
// The PDF source is in original.pdf
readfile('original.pdf');
?>
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
Is php faster than javascript?
Explain some of the php string functions?
Are php sessions cookies?
What are the methods useful for method overloading?
How to test if a variable is an array?
Do you know what's the difference between __sleep and __wakeup?
What is a helper function?
How can we get ip address of a client in php?
How to send email using php script?
Tell me how can we automatically escape incoming data?
How cookies are transported from browsers to servers?
What does the unset() function means?
What is symfony php?
What's the output of the ucwords function in this example?
What is the functionality of md5 function in php?