php curl post parameters not passed to server
- by user121196
<?php
$data = array('name' => 'Ross', 'php_master' => true);
$url="http://localhost/test.php";
$handle = curl_init($url);
curl_setopt($handle, CURLOPT_POST, true);
curl_setopt($handle, CURLOPT_POSTFIELDS, $data);
curl_exec($handle);
?>
the $_POST variable on server side is empty, I also tried using java servlet, request.getParameterNames() is also empty. why are the post parameters lost?