How would you impletement download and upload a file in php
Answers were Sorted based on User's Feedback
Answer / vijaya
refer this link for uploading
http://php-mysql-javascript-css.blogspot.com/
for files downloading you can use headers .
<?php
// We'll be outputting a PDF
header('Content-type: application/pdf');
// It will be called downloaded.pdf
header('Content-Disposition: attachment;
filename="downloaded.pdf"');
// The PDF source is in original.pdf
readfile('original.pdf');
?>
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / master
uploading is down using html file tag and later on moved to
the destination location.
for downloading we can use the pdf format so once we click
on the link the pdg format of the file will be downloaded
Is This Answer Correct ? | 1 Yes | 2 No |
can we swap two different string using php for example:-- before swapping:-- 1 string :-hello friend, 2 string :-my dear, after swapping that strings will be: 1.hello dear, 2.my friend.
what type of images that the PHP version supports
Tell me how is it possible to return a value from a function?
Where is my php ini file?
Why php is better?
Hello Friends,I am seeking for a job in php having 9 months. exp.Please suggest any company openings.
Are php variables global?
What is pdo in php why use?
What is the difference between explode and split?
Explain what are some new features introduced in php7?
Tell me what is the difference between unset() and unlink()?
What are the ways we can destroy a session variable ?