Question:Consider the following script. What will the file myfile.txt contain at the end of its execution?
<?php
$array = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$f = fopen ("myfile.txt", "r");
for ($i = 0; $i < 50; $i++) {
  fwrite ($f, $array[rand(0, strlen ($array) - 1)]);
}
?>
 

A Nothing, because $array is not an actual array but a string. 

B A random sequence of 49 characters. 

C A random sequence of 50 characters. 

D A random sequence of 41 characters. 

E Nothing, or the file will not exist, and the script will output an error 

+ Answer
+ Explanation
+ Report
Total Preview: 961

Copyright © 2024. Powered by Intellect Software Ltd