[thelist] Supress php errors

der wert derwert at hotmail.com
Wed Aug 9 15:18:46 CDT 2006


Ivo you need to provide more information, perhaps more of the code
why are you trying to include a script from a site you do not control?
a quote from the php manual "You can define a constant by using the 
define()-function. Once a constant is defined, it can never be changed or 
undefined."

you can't change a constant onces it's been set

I turned on all error message and tried this

error_reporting(E_ALL);
define("CONSTANT", "Hello world");
define("CONSTANT", "Hello world2");

which of course gives the error message
"Notice: Constant constant already defined in 
/var/www/htdocs/constant_test/index.php on line x"

choking the error does work, as I tried it

error_reporting(E_ALL);
define("CONSTANT", "Hello world.");
@define("CONSTANT", "Hello world.2");

but once again, you can't change a constant so there is no reason to have 
this in the first place

provide more code and more reasoning for doing what you're doing and you'll 
be able to receive more help

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee® 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963




More information about the thelist mailing list