How would you impletement download and upload a file in php

Answers were Sorted based on User's Feedback



How would you impletement download and upload a file in php..

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

How would you impletement download and upload a file in php..

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

Post New Answer

More PHP Interview Questions

Is false empty php?

0 Answers  


What is php in full?

0 Answers  


How many ways are there for passing variables between pages in PHP and what are they ?

10 Answers  


What is difference between python and php?

0 Answers  


Does php use html?

0 Answers  






Single choice objective PHP question...

1 Answers  


How to send a cookie to the browser?

0 Answers  


Write a program to get second highest number in an array using php?

0 Answers  


hello all, I need some sample placement papers in lion bridge.. can anyone help me?

0 Answers   Lionbridge,


What is __ construct in php?

0 Answers  


What is the main difference between require() and require_once()?

0 Answers  


What is json php?

0 Answers  


Categories