Php Objective Questions with Answers for written test exams 47

Question 47
Customers are fickle things.

Just as you have your new file replication code working, one of your major customers

informs you that they have installed a firewall between the admin server

and the web servers.

This totally prevents your file replication code from working.

Helpfully, the customer does allow outgoing HTTP connections through the firewall.

You’ll need to provide an alternative script, that uploads the files to the web

servers through a HTTP connection. How are you going to do that?

Choose from one or more of the following.

A. File wrappers can’t upload files via http. You’ll have to use the CURL

extension to achieve this.

B. Just open a URL as a file and write to it. The whole point of file wrappers

is to make operations like this easy.

C. Use the stream context to tell the http file wrapper where to upload the file,

and have a script on the web servers move the file from the uploads directory

to their final destination.

D. Use the FTP file wrapper to upload files directly to their final destination.
Answers 47


The correct answer is C.

  







Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---