我想从php文件中恢复值字符串,以便在python中使用cgi模块
在my file.php中,我有:
<input type="password" name="pwd">
然后在我的文件.cgi中,我想获取密码并转义speciales字符:
formulaire = cgi.FieldStorage()
pwdStr = cgi.escape(formulaire.getValue("pwd"))
我不想在带有参数的其他函数中使用pwdStr,但pwdStr的类型不是str。如何转换为str?我试过:
pwdStr = str(cgi.escape(formulaire.getValue("pwd")))
但是没有起作用
有人能帮我吗? 巴西亚
目前没有回答
相关问题 更多 >
编程相关推荐