0
Please how do I solve this question
Fill in the blanks to write the numbers 1 to 10 to the file. $h = ______ ('file.txt', 'a'); for($i=1;$i<=10; $i++) { ______($h, $i); } ______($h);
12 Réponses
+ 7
$h = fopen
('file.txt', 'a');
for($i=1;$i<=10; $i++) {
fwrite ($h, $i);
}
fclose ($h);
+ 1
fopen-that is file open function
fwrite-that is file read/write function
fclose-that is file close function
0
Oh no is answering but fortunately, I got the answer...
$h = fopen ('file.txt', 'a'); for($i=1;$i<=10; $i++) {fwrite($h, $i); }fclose($h);
0
$h =
fopen
('file.txt', 'a');
for($i=1;$i<=10; $i++) {
fwrite
($h, $i);
}
fclose
($h);
0
Fill in the blanks to open the file using append mode, write to it, and close it.
$h =
//fopen
('my.txt', '
//a
');
fwrite($h, 'test');
//fclose
($h);
// answer shown
0
$h =
fopen
('file.txt', 'a');
for($i=1;$i<=10; $i++) {
fwrite
($h, $i);
}
fclose
($h);
0
fopen , a and fclose
- 1
$h =
fopen
('my.txt', '
a
');
fwrite($h, 'test');
fclose
($h);
- 2
.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................hmmmm
- 3
Rearrange the code to write 12 to the file 'num.txt'.
fwrite($handle, '1');
$handle = fopen('num.txt', 'w');
fwrite($handle, '2');
fclose($handle);
- 3
$h = fopen
('file.txt', 'a');
for($i=1;$i<=10; $i++) {
fwrite($h, $i);
}
fclose($h);
php
- 3
Answer is $h =
fopen
('file.txt', 'a');
for($i=1;$i<=10; $i++) {
fwrite
($h, $i);
}
fclose
($h);