Answers to Chapter 8

  1. "What will the following function call return: is_readable("http://www.slashdot.org")" The answer is "false" - is_readable() doesn't work on remote files.

  2. "Which function locks files" Answer "c" of course, flock().

  3. "What is the primary difference between rename() and move_uploaded_file()" The latter only works on files that are uploaded, whereas rename() will rename or move any file that it is able to.

  4. "In the .ini file format, what is considered to be the start of a comment" The answer is "c", the semi-colon.

  5. "Which superglobal array contains information on uploaded files" The answer is "d", "None of the above". The $_FILES superglobal contains uploaded file information.

  6. "Under what circumstances can the file_exists() function report incorrect data" The results of this function are cached, which means if a file is checked then deleted and checked again, PHP will just report that it exists.

 

Next chapter: Answers to Chapter 9 >>

Previous chapter: Answers to Chapter 7

Jump to:

 

Home: Table of Contents

Follow us on Identi.ca or Twitter

Username:   Password:
Create Account | About TuxRadar