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
Does session expire on closing browser?
Is php fully object oriented?
Name some of the popular frameworks in php.
How to remove duplicate values from php array?
Where is the functions php in wordpress?
How to create connection in php?
Write the statements that are used to connect php with mysql
Tell me how do you define a constant?
Explain the types of string comparision function in PHP
Name some of the functions in php.
Is empty in php?
What is the difference between file_get_contents() and file_put_contents() in php?
What is the use of the function 'imagetypes()'?
What would occur if a fatal error was thrown in your php program?
What is mysqli_real_escape_string?