PHP read ini configuration error syntax error, unexpected ‘=’In

Error information

Warning: syntax error, unexpected '=' in src/web/../conf/config.ini on line 12



Because start_ The URL contains the URL, which must be quoted before PHP will report an error. However, it is not a problem to read it in Python.

terms of settlement

Add the parameter ini when reading_ SCANNER_ RAW

$file = __DIR__ . "/../conf/config.ini";
$config = parse_ini_file($file, true, INI_SCANNER_RAW);

Read More: