0
Hello, I would like to capture PHP errors in codeigniter and store them in the database, or at least display them more smoothly to the user, in the error_php.php file all the details I need are displayed, up to the line of code where the error occurred, but I would like to get this information in the controller to be able to store.
<h4>A PHP Error was encountered</h4>
<p>Severity: <?php echo $severity; ?></p>
<p>Message: <?php echo $message; ?></p>
<p>Filename: <?php echo $filepath; ?></p>
<p>Line Number: <?php echo $line; ?></p>
I tried with try catch but it didn’t work, I tried to play for flashdata and then use, but it’s not correct and it still didn’t work either.
How did you try to capture Exception? in production environment this giant msg some (you need to set this up).
– rray
Hi, so I tried yes, but actually I don’t want it to disappear no, I want to be able to store the error in the database. or at least work it in a more friendly way. it seems that when Exception is even possible, then it redirects to the erro_exception view, but in this case it sends to erro_php, I think there is no Exception for these errors (I think)
– Eduardo Dos Santos