为什么是$email
而$pass
不是打印出来,他们张贴为空。我得到以下结果print_r()
[email] =>
[password] =>
下面是我的代码。我究竟做错了什么
<?php
$email = $_POST["data[User][email]"];
$pass = $_POST["data[User][password]"];
$base = 'https://api.whatever.com/Api?';
$params = array(
'Format' => 'json'
,'email' => "$email"
,'password' => "$pass"
);
$url = $base . http_build_query( $params );
$result = file_get_contents( $url );
echo '<pre>';
print_r( json_decode( $result ) );
echo '</pre>';
?>