Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 PHP 中从此对象获取电子邮件变量?
$data = $_POST["data"];
内容$data:
$data
Object {email: "peter.m@gmail.com"}
也许它是一个json字符串?尝试:
$data = json_decode($data); $email = $data->email;
这应该工作”
$email_string = $data->email; //should work // or $email_string = $data['email']; //might also work