简体   繁体   中英

Php display_errors

I'm trying to make php show errors, right now all I get is a blank page. I've tried changing the php.ini file that seems to be the php configuration file but to no success. Could it be that phpinfo() is wrong about what config file is been loaded? (I did restart apache)

phpinfo Loaded Configuration File -> /etc/php5/apache2/php.ini. I copy-pasted the path and filename so misspelling it is not an issue.

do this by using the following code and inside you php.ini file display_errors = on

error_reporting(E_ALL);
ini_set('display_errors',1);
ini_set('error_reporting', E_ALL);
ini_set('display_startup_errors',1);
error_reporting(-1);

Enable error reporting at the top of the php page:

ini_set("display_errors", 1);
ini_set("display_startup_errors", 1);
error_reporting(-1);

Place this at the top of your page, but be sure to remove it once you have your errors corrected. You don't want the entire world to be able to have insight into your database structure.

<?php
ini_set('display_errors',1); 
error_reporting(E_ALL);
?>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM