我用教程设置了一个专用服务器。
我在PHP中设置:
mbstring.language=UTF-8 mbstring.internal_encoding=UTF-8 mbstring.http_input=UTF-8 mbstring.http_output=UTF-8 mbstring.detect_order=auto
但每次有一个$的密码(我有一个为MySQL的+其他脚本的根)密码将无法正常工作。
例如,我只是删除脚本的密码$ ,它的工作。
当我通过phpmyadmin连接mysql上的@root时:不工作当我通过PHP连接@root时:工作
我能为这个问题做些什么?
PS:当我通过控制台连接mysql时,我的密码正常工作
好的,发现问题,只发生在Firefox上。 我清理所有的caching+cookies。 问题解决了。
奇怪的。 但解决了。 谢谢大家;)
$ in PHP有一个特殊的含义,如果用在双引号(“)string中,你应该转义它,或者你应该使用单引号(')string:
"Pa$$word"
将无法正常工作
"Pa\$\$word"
和
'Pa$$word'
将工作。
在你的PHPconfiguration中,设置为magic-quotes-runtimevariables的反过来。 这里是更多的信息: http : //www.php.net/manual/en/info.configuration.php#ini.magic-quotes-runtime 。 Phpmyadmin将能够支持包含$的密码。 也可以使用最新版本的PMA。