I am getting a php error by parsing the following command
system.ini file
#comment 1 here
product=2
#comment 2 here
items=1
I am using
$items = parse_ini_file("system.ini", false, INI_SCANNER_RAW);
to parse the file.
However, I am getting
PHP Deprecated: Comments starting with '#' are deprecated error.
I don't have the access to the system.ini
. Is there anything I can do in the php file to pass the parsing for the comments? Thanks!
As you have no access to the ini file; you can suppress that warning with the @
symbol.
$items = @parse_ini_file("system.ini", false, INI_SCANNER_RAW);
Alternatively you could suppress all depreciated warnings with;
error_reporting(E_ALL ^ E_DEPRECATED);
towards the top of your code.