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
How to create reusable code in php?
What is polymorphism php?
What is orm in php framework?
Where is session value stored php?
What is symfony php?
Which function would you use to insert a record into a database in php?
Tell me how to create a text file in php?
What is the difference between indexed and associative array?
How does csrf token work?
What is the difference between for and foreach?
What is psr in php?
What is php string function?
What is return in php function?
Explain me what is the difference between $_files['userfile']['name'] and $_files['userfile']['tmp_name']?
How does php work with apache?