php - checking a $_SESSION var -
cans explains me why code isnt working?
if ($_session['developing'] == 1) { // use 1 when developing error_reporting(e_all); ini_set('display_errors', 1); ini_set('display_startup_errors', 1); } else { // use 1 when developing error_reporting(e_all); ini_set('display_errors', 0); ini_set('display_startup_errors', 0); }
at login, have check box, if checked want set $_session variable 1. (done)
after that, in functions file, want check output errors if in development mode or don't show. if var_dump results want.
i think complicating more needs be. rather having checkbox , $_session
combination provides option of development or not, make use of define
, standard way of doing far have seen.
note: session temporary need keep setting , secondly, ensure have session_start
on top of script.
Comments
Post a Comment