PHP code with error message fclose () expects parameter 1 to be resource

0

I have the following code:

<?php
$fp=@fopen('test','r');
@fread($fp,2000);
@fclose($fp); 
?>

with the following error:

  

fclose () expects parameter 1 to be resource, boolean given: 4

* even when I remove @ the error persists!

    
asked by anonymous 02.10.2017 / 15:19

0 answers