1.

If you want to temporarily store uploaded files in the /tmp/phpuploads/ directory, which one of the following statement will you use?(a) upload_tmp_dir “/tmp/phpuploads/ directory”(b) upload_dir “/tmp/phpuploads/ directory”(c) upload_temp_dir “/tmp/phpuploads/ directory”(d) upload_temp_director “/tmp/phpuploads/ directory”I have been asked this question in an internship interview.This intriguing question comes from Uploading Files with PHP topic in chapter File and Session Handling in PHP of PHP

Answer»

The correct ANSWER is (a) upload_tmp_dir “/tmp/phpuploads/ directory”

To explain: ANYONE can temporarily store uploaded files on the given directory. One cannot change upload_tmp_dir at the RUNTIME. By the time a script runs, the upload PROCESS has ALREADY occurred.



Discussion

No Comment Found

Related InterviewSolutions