我有接触外部API不添加斜线
$arr = array(
"domain_name" => $_POST["domain"],
"auto_renew" => false,
"domain_lock" => false,
"whois_privacy" => false,
"contact_registrant_id" => $_POST["registrant_contact"],
"contact_admin_id" => $_POST["admin_contact"],
"contact_tech_id" => $_POST["tech_contact"],
"contact_billing_id" => $_POST["billing_contact"],
"auth_code" =>($_POST["auth_code"])
);
我张贴的$_POST["auth_code"]
值是l&"IkM%Wbjjq7
然而,当它张贴此值,它被张贴了这个PHP代码PHP后值as l&\\\"IkM%Wbjjq7
因此,它添加斜线,这是造成问题。
你试过addslashes()吗? –
为什么我'addslashes'当我不要他们 – charlie
检查此链接http://stackoverflow.com/questions/6339145/how-to-remove-multiple-slashes-in-uri-with-preg-or-htaccess –