Greywacke Posted January 25, 2011 Share Posted January 25, 2011 hi there,this is just a question regarding possible php errors being displayed, wether it would be possible at all to replace the line breaks with \n and remove the html tags - so they can be written to a javascript document to be alerted in the browser instead of viewing source every time?all opinions and beliefs regarding this are welcome... i have tried to on this, and came up with a bunch of useless results! (php error remove line break) :/unfortunately i can't see how changing this would return the results i seek :/ Link to comment Share on other sites More sharing options...
Ingolme Posted January 25, 2011 Share Posted January 25, 2011 You can define how errors are displayed with this function: http://es.php.net/manual/en/function.set-error-handler.phpI'm not sure to what extent, though. It doesn't seem to work for all types of errors. Link to comment Share on other sites More sharing options...
justsomeguy Posted January 25, 2011 Share Posted January 25, 2011 ini_set('html_errors', 0); Link to comment Share on other sites More sharing options...
Greywacke Posted January 26, 2011 Author Share Posted January 26, 2011 nono, i do not want to turn them off though - i will look into Ingolme's suggestion further, thank you! Link to comment Share on other sites More sharing options...
Synook Posted January 26, 2011 Share Posted January 26, 2011 Setting html_errors to 0 doesn't turn error reporting off (that's the error_reporting option), it just turns off the HTML formatting for reported errors.http://www.php.net/manual/en/errorfunc.con...ini.html-errors Link to comment Share on other sites More sharing options...
Greywacke Posted January 26, 2011 Author Share Posted January 26, 2011 ahh awesome thanks! Link to comment Share on other sites More sharing options...
Greywacke Posted January 26, 2011 Author Share Posted January 26, 2011 hi again - and thanks, though it just removes the html formatting and not the line breaks... :/ don't suppose there is a way to remove them? had a look around google but couldnt seem to find anything... :/ Link to comment Share on other sites More sharing options...
justsomeguy Posted January 27, 2011 Share Posted January 27, 2011 There's not a configuration option to remove line breaks from error messages. You can use set_error_handler like Ingolme pointed out to handle certain errors, but it doesn't handle all error types. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.