search

Home  >  Q&A  >  body text

PHP prompts Warning: Unknown after turning on display_errors

How to solve this error?

The code is very simple:

<?php
ini_set('display_errors', true);

Prompt error message:

Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0

I have found many similar error messages on the Internet, but they all have a Fatal Error after warning. I only have this line warning level error message.

ringa_leeringa_lee2732 days ago578

reply all(2)I'll reply

  • 習慣沉默

    習慣沉默2017-05-24 11:35:43

    1. This configuration should be configured in php.ini;

    2. Because the file does not have write permission, just enable the file write permission in the directory.

    reply
    0
  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-24 11:35:43

    Configuration error prompt

    <?php
    
    ini_set("display_errors",On);
    ini_set("error_reporting",E_ALL);//错误日志级别
    

    Error resolution

    Permission error is expressed in English. Please check whether a file you are operating has permissions that are readable, writable, readable, or executable

    $ll -l
    
    

    reply
    0
  • Cancelreply