PHP:.ini文件中的非法字符转义 [英] PHP: Escape illegal chars in .ini-files

查看:86
本文介绍了PHP:.ini文件中的非法字符转义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

parse_ini_file 上的文档指出,您不能在值中使用 {} |&〜!!(()^"这些字符.是否有一些方法可以转义这些字符?我需要使用它们.工作.

The documentation on parse_ini_file states that you can't use these chars {}|&~![()^" 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.

这篇关于PHP:.ini文件中的非法字符转义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆