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 function func_num_args() used for?
How can we encrypt the password using php?
Tell me what are magic methods?
What is the function used to change the root directory in PHP?
Is php better than python?
What is the difference between single quoted string and double quoted string?
How is a constant defined in a PHP script?
What is T_PAAMAYIM_NEKUDOTAYIM?
What is the correct line to use within the php.ini file, to specify that 128mb would be the maximum amount of memory that a script may use?
How to block direct directory access in PHP?
What is mod_php?
Tell me what is the importance of "action" attribute in a html form?
Do you know how to get the ip address of the client?
What is a query give example?
Which php function will attach one file to another?