Detailed error on fopen

后端 未结 4 758
深忆病人
深忆病人 2021-01-01 12:13

I\'m using fopen to read from a file

$fh = fopen($path, \'r\') or die(\'Could not open file\');

Now I contantly get error Could not open fi

4条回答
  •  [愿得一人]
    2021-01-01 12:38

    Turn on error reporting, or, in a production environment (from PHP 5.2.0 onwards) you should also be able to use error_get_last().

提交回复
热议问题