Answer Posted / rashmi
On HTML:
<form enctype="multipart/form-data" action="uploader.php"
method="POST">
<input name="uploadedfile" type="file" />
<input type="submit" value="Upload File" />
</form>
On PHP script:
<?php
$data="any_file.Ext";
$ft=filetype($data);
header('content-type: application/$ft');
header('content-length:'filesize($data));
header('content-disposition:filename='.$data);
echo file_get_contents($data);
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
How to set session.gc_maxlifetime properly?
How to make database connection in php?
How do I run php?
What’s the special meaning of __sleep and __wakeup?
What are helpers in php?
if you run the app program all vendor open items are cleared but is it possible to reverse the again again open items please tell me the answer
What is a static method php?
Is php used for frontend or backend?
What is php routing?
Explain what does $_server means?
How can we display the output directly to the browser?
Do while loops php?
What is dao in php?
Tell me how would you declare a function that receives one parameter name hello?
Is null function in php?