<<< Previous question <<< Question ID#0701.md >>> Next question >>>
Assuming that the code below is in a file named "test.php" and that PHP has full rights over the file, what happens if the file is executed from the command line without any arguments ?
exec("rm -f " . dirname(__FILE__) . "/" . $argv[0]);
- A) The file test.php is deleted
- B) The script exits without doing anything
- C) A notice is thrown because $argv[0] is not defined and the script fails.
- D) an error
Answer
Answer: A