dou44364983
dou44364983
2013-06-07 01:56

.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 drde3456 8年前

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

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

    点赞 评论 复制链接分享

相关推荐