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
What is url encoding and decoding in php?
What is session in PHP. How to remove data from a session?
What are php magic quotes?
Why do we use htaccess
Tell me is it possible to protect special characters in a query string?
How can I find my php version?
How can we destroy the cookie in php?
What is filter_var?
What does the arrow mean in php?
Explain me the difference between include and require?
What is ci in php?
Does csrf token change?
What is explode() in php?
What is mysqli_real_escape_string?
What are the encryption techniques in php?