Question
How can I access the path settings, or more general, how do I access settings defined in the settings.php
.
My settings.php
Important note: These are the values for the test environment, they have to be changed for production!
// Should be set to 0 in production
error_reporting(E_ALL);
// Should be set to '0' in production
ini_set('display_errors', '1');
// Timezone
date_default_timezone_set('FILL_IN_YOUR_TIMEZONE');
// Settings
$settings = [];
// Path settings
$settings['root'] = dirname(__DIR__);
$settings['temp'] = $settings['root'] . '/tmp';
$settings['public'] = $settings['root'] . '/public_html';
// Error Handling Middleware settings
$settings['error'] = [
// Should be set to false in production
'display_error_details' => true,
// Parameter is passed to the default ErrorHandler
// View in rendered output by enabling the "displayErrorDetails" setting.
// For the console and unit tests we also disable it
'log_errors' => true,
// Display error details in error log
'log_error_details' => true,
];
return $settings;
I've been working on this for hours, trying different thinks, but neither found any working clue in the Slim v4 documentation, nor on other sites.