What does ini_set do in this php code?
if ( ini_set( 'display_error', '1' ) === false )
throw new \Exception( 'Unable to set display_errors.' );
Please help me run this code and display error I use laragon and it's not working
it will set the value of a configuration option of the php.ini
file
in your case, it will turn on the display error in PHP code, so if you have an error, PHP will display it to you
instead of display_error
you should put display_errors
ini_set
is a function to change php.ini
settings
you can change your php.ini
settings like this image: