I have display errors set to on in my php configuration.
i only want to turn of display errors on one particular page/script
i have tried to use the set_ini() and error_reporting() functions, but they do not seem to hide the erros
[PHP]ini_set('display_errors', 0);
error_reporting(0);[/PHP]
none of the above work.
a short script
[PHP]<?php
echo ini_get('display_errors')."<br>";
ini_set('display_errors', 0);
echo ini_get('display_errors')."<br>";
echo "hello world 1<br>";
echo "hello world 2<br>"
echo "hello world 3<br>";
?>[/PHP]
as can be seen from the above code i'm outputing the value of display errors: which in this case gives me '1'
next i'm setting it to '0' by using the set_ini function.
then i'm outputing the value of display erros, which this time gives me '0'.
meaning that the set_ini has worked.
but then when the script continues onto echo out 'hello world 2', the scipt should fail as there is no ';' at the end of this line.
the scirpt does in fact fail, but it also displays the error
Parse error: syntax error, unexpected T_ECHO, expecting ','
i've set display_erros to off, so why is it displaying this error message.
any help on this would be great.