When PHP encounters an error, it displays the Error or Warning message in a div with some inline style. I wish to add a class="some-class" or id="some-id" attribute to the div so that I can do a little styling in my CSS file. Is that possible and how?
When PHP encounters an error, it displays the Error or Warning message in a
Share
Never use an ID twice in the same page. PHP errors are printed en masse, so use a class instead. Find the following two lines in your
php.inifile (on my Ubuntu box, it’s in/etc/php5/apache2/php.ini:And change them to suit your needs. I use inline styles with them so I don’t have to add anything into my stylesheet, but you could of course add a class. This is my setup:
Yours might be something like this: