dou44364983 2013-06-07 01:56
浏览 96
已采纳

.yml文件和Symfony2 / Doctrine2 - 在密码中转义特殊字符

I have a MySQL password with special chars "%" and "$". How can I use it with Symfony2/Doctrine2 and .yml files?

I try: "pa%s$s" 'pa%s$s' pa%s$s and it didn't work.

  • 写回答

1条回答 默认 最新

  • drde3456 2013-06-07 10:39
    关注

    The answer is: Escaping: "%" char Use: "%%"

    Example: "pa%s%s" should be: "pa%%s%%s"

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?