24.7 Answers to Chapter 8This is NOT the latest copy of this book; click here for the latest version.
-
"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.
|
Want to see this stuff in print? PHP in a Nutshell takes the core topics covered here, adds in thousands of edits from the editorial team and myself, and combines them to make an unbeatable reference for PHP programmers at all levels.
My latest book has hundreds more tips on how to use PHP, Apache, and MySQL, plus Perl, Python, shell scripts, performance tuning, and more!
|