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
sort term descripttion form, report and uery
Is php 5 still supported?
What is data structure in php?
What is strstr php?
What is session data?
How to break a file path name into parts?
How do you end php?
Which function(s) in PHP computes the difference of arrays?
Does strlen include null?
How to convert strings in hex format?
What is mysql_fetch_object?
Is python similar to php?
Explain Booleans in PHP?
How to call a php function from another php file?
Is jquery better than javascript?