使用@的DSN连接和密码 [英] DSN connection and password with @

查看:57
本文介绍了使用@的DSN连接和密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我考虑切换到使用DSN连接的数据库访问库-connect("mysql://login:password @ database?opt​​ions").DSN使用@作为分隔符.这是否意味着密码不能包含@符号?还有其他限制吗?

I think about switching to DB access library that uses DSN connection - connect("mysql://login:password@database?options"). DSN uses @ as a separator. Does it mean that the password cannot contain @ symbol? Is there other restrictions?

推荐答案

使用DSN可能会遇到任何特殊字符,特别是在语言/平台转义或特殊字符规则决定干预的情况下.

Any special characters can be tricky with DSNs, particularly if the language / platform escaping or special character rules decide to intervene.

对于梨样式DSN ,我想您正在使用,使用 URL编码应该可以安全地保护特殊字符( @ ==%40 )翻译不正确.

For Pear style DSNs, which I suppose you are using, it should be safe to use URL encoding to protect special characters (@ == %40) from being translated incorrectly.

这篇关于使用@的DSN连接和密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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