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 closing tag necessary?
Write a php script to get the largest key in an array?
Why do we use csrf token?
What are the three classes of errors that can occur in php?
What is the difference between explode () and split () functions in php?
How does session work in php?
What is echo and print in php?
How can you make a connection with mysql server using php?
Does wordpress run on php 7?
How to pad an array with the same value multiple times?
Tell me what is the use of explode() function?
What does csrf token mismatch mean?
When to use get and post request?
Where is session value stored php?
How many open modes available when a file open in PHP?