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
What is the default session out time?
Explain how can we execute a php script using command line?
What is T_PAAMAYIM_NEKUDOTAYIM?
Explain what is the use of "echo" in php?
How to split a string into array using php?
Why do we use session?
How to create connection in php?
Tell me what are sql injections, how do you prevent them and what are the best practices?
What are the differences between echo and print?
Tell me can the value of a constant change during the script's execution?
Is python easier than php?
Do csrf tokens expire?
How does firefox manage cookies?
Is empty in php?
Explain Type hinting in PHP?