From: Nicolas Boisselier Date: Wed, 18 May 2016 22:15:42 +0000 (+0100) Subject: config order X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=82c51ddfcf07d3db6124d4ac80f5f3058db4452e;p=nb.git config order --- diff --git a/lib/php/config.php b/lib/php/config.php index 10b9b73b..c76926a2 100644 --- a/lib/php/config.php +++ b/lib/php/config.php @@ -9,20 +9,20 @@ #define('NB_EOL',''); #define('NB_PROD',true); require(dirname(__FILE__).'/nb.php'); +if (nb::php_cli()) argv2request(); + if (!empty($_SERVER['PROD'])) return; -if (nb::php_cli()) argv2request(); +error_reporting(E_ALL | E_STRICT | E_NOTICE); +ini_set('display_errors', 1); +if (nb::php_cli() or nb::p('txt_errors')) ini_set('html_errors', false); // Should be done in php.ini for performance date_default_timezone_set('Europe/London'); -error_reporting(E_ALL | E_STRICT | E_NOTICE); # NB 05.03.16 ini_set('include_path', realpath(dirname(__FILE__).'/../lib').':'.realpath(dirname(__FILE__)).':'.ini_get('include_path')); ini_set('include_path','' .':'.realpath(dirname(__FILE__)) .rtrim(':'.ini_get('include_path'),':') ); - -ini_set('display_errors', 'On'); -if (nb::php_cli() or nb::p('txt_errors')) ini_set('html_errors', false); ?>