Answers to Chapter 8
-
"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.
-
"Which function locks files" Answer "c" of course, flock().
-
"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.
-
"In the .ini file format, what is considered to be the start of a comment" The answer is "c", the semi-colon.
-
"Which superglobal array contains information on uploaded files" The answer is "d", "None of the above". The $_FILES superglobal contains uploaded file information.
-
"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



Copyright 2010 Future Publishing Limited (company
registered number 2008885), a company registered
in England and Wales whose registered office is at
Beauford Court, 30 Monmouth Street, Bath, BA1 2BW, UK