when calling the interface, the code is normal locally. When it is placed on the server, it is reported that the host cannot be parsed. It has been debugged several times, sometimes good and sometimes bad. What is the reason for this? is the code incorrect or is there something on the server that has not been set up? Is there any kind boss passing by to give me an answer? thank you very much!
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_TIMEOUT, 3);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
this is the curl code. Is there something missing?