我想pg_escape_string在我的password罐头里使用,任何人都会使用它来使用它?在我的postgresql insert表中
$query = "insert into vmobjects (guid,ipaddress,username,password,hostid,vmname,guestostype) values('".$guid."','".$ip."','".$username."','".$password."','".$hostid."','".$name."','".strtolower($os)."')";
Run Code Online (Sandbox Code Playgroud)
我正在使用 $escaped = pg_escape_string($password);
$query = "insert into vmobjects (guid,ipaddress,username,password,hostid,vmname,guestostype) values('".$guid."','".$ip."','".$username."','".$escaped ."','".$hostid."','".$name."','".strtolower($os)."')";
Run Code Online (Sandbox Code Playgroud)
但它不工作它不会采取我的& and +字符串...就像我插入@#&$%&^*密码然后after @#它显示nul values.... pg_escape_string不工作
它需要'~!@#$%^*()_=-{} |] [:"'; <>?/.,'&except和+`字符串.
我的后端表行插入&字符串作为null value和后&字符串all values are null
和在的情况下+ string this is only null
Plz请勿将我的网站手册推荐给我
我正在通过AJAX将表单字段的内容发布到PHP脚本并使用此代码
if(!http)
http = CreateObject();
nocache = Math.random();
http.open('post', 'addvm.php');
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");
http.onreadystatechange = SaveReply;
http.send(params);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5342 次 |
| 最近记录: |