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
Tell me how can we automatically escape incoming data?
Write a php function to convert all null values to blank?
What are the array functions in php?
What is the difference between == and === in php?
What are the ways to define a constant in php?
How do I make a reset button in html?
Is nan in javascript?
Differentiate between php5 and php7?
Where is my php ini file?
How to set session.gc_divisor properly?
What is form submission?
What is the current php version?
Explain me what is sql injection?
What is abstraction php?
How does php session work?