php file_get_contents 警告,如何修复php警告:file_get_contents?无法打开流:HTTP请求失败...

如何修复php警告:file_get_contents?

Warning: file_get_contents(http://192.168.1.254:9999/api/p/internal/ucenter/login?loginName=test102&password=111111) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request in /Applications/XAMPP/xamppfiles/htdocs/PHP_test/index.php on line 49

这是与$files相关的代码:

$loginNames="test102";

$passwords="111111";

$apiUrl = "http://192.168.1.254:9999/api/p/internal/ucenter/login?loginName=".$loginNames."&password=".$passwords;

$callback = file_get_contents($apiUrl);

print_r($callback);

//echo $callback;

?>