I have wordpress plugin that generate dynamic CSS from PHP, let say the file name is dynamiccss.php. here is the code :
<?php
header("Content-type: text/css; charset: UTF-8");
$parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
require_once( $parse_uri[0] . 'wp-load.php' );
//CSS GOES HERE
?>
Everything work well, but if i use another plugin and that plugin has an error in the PHP the error message always appears in my css file, for example when I access the css file from http://domain.com/dynamiccss.php:
<br />
<b>Warning</b>: SOME PHP ERROR HERE...
My CSS CODE
This error message causes mess css. How to prevent this? thank you very much.