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
Can you use php and javascript together?
Explain me what is the use of 'print' in php?
What are major variables in research?
How to create an array from php string?
What is a model in php?
How cookies are trported from browsers to servers?
How do I escape data before storing it in the database?
Is laravel an oop?
What language is php based on?
What is php date function?
Explain mail function in PHP with syntax?
Which variable declarations within a class is invalid in php?
Does php 5 support exceptions?
What is composer used for?
Why did you choose this particular career path?