开发者

PHP: Escape illegal chars in .ini-files

The documentation on parse_ini_file states that you can't use these chars {}|&am开发者_JS百科p;~![()^" in the value. Is there some way to escape these chars? I need to use them. Normal escaping with \ doesn't seem to work.


The manual says those characters can not be used in the key -- the opposite of the value. To use them in values, double-quote the string.


Try using INI_SCANNER_RAW (from the same documentation) for scanner_mode:

parse_ini_file ( $filename, true, INI_SCANNER_RAW );
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜