0
When trying to execute the fwrite
in PHP, I get the following message:
Notice: fwrite(): write of 24 bytes failed with Errno=9 Bad file Descriptor in C: Apache24 htdocs run-php run.php on line 5
The code is as follows::
<?php
$arquivo = fopen('file.txt', 'r');
fwrite($arquivo, 'Conteúdo a ser inserido');
fclose($arquivo);
What is the reason for this error, how can I resolve?
Thank you, it was inattentive.
– user106463