为什么它总是返回true?
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_TIMEOUT, 4);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml; charset=utf-8', 'Content-Length: '.strlen($post_string),'SOAPAction:urn:RemoteUserStoreManagerServiceHttpsSoap11Endpoint','Authorization: Basic YWRtaW46YWRtaW4=' ));
$data = curl_exec($ch);
if($data===true){
echo"<script>location.assign('utente.php')</script>";
}else{
echo"<script>location.assign('index.php?a=0')</script>";
}我尝试了许多解决方案,但都没有成功。
发布于 2017-02-23 12:48:39
只需删除此行curl_setopt($ch,CURLOPT_RETURNTRANSFER,1)即可;
https://stackoverflow.com/questions/41849053
复制相似问题