PHP cURL 스크립트를 사용하여 문제가 발생했습니다. 그것은 내 localhost에서 잘 작동하지만 내 서버에서 작동하지 않습니다. 내 서버가이 스크립트를 제외한 다른 컬 스크립트를 성공적으로 실행할 수 있습니다.cURL이 작동하지 않습니다.
다음Array ([url] => http://xx.xx.xx.xx:8080/bulksms/bulksms
[content_type] =>
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 15.00012
[namelookup_time] => 0.000145
[connect_time] => 0
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => -1
[upload_content_length] => -1
[starttransfer_time] => 0
[redirect_time] => 0
[certinfo] => Array ()
[primary_ip] => xx.xx.xx.xx
[primary_port] => 8080
[local_ip] =>
[local_port] => 0
[redirect_url] =>)
내 로컬 호스트에서 print_r(curl_getinfo($ch));
의 결과입니다 : 이 내 서버에서 print_r(curl_getinfo($ch));
의 결과입니다
Array ([url] => http://xx.xx.xx.xx:8080/bulksms/bulksms
[content_type] => text/html;charset=UTF-8
[http_code] => 200
[header_size] => 141
[request_size] => 178
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.89
[namelookup_time] => 0
[connect_time] => 0
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 4
[speed_download] => 4
[speed_upload] => 0
[download_content_length] => 4
[upload_content_length] => 0
[starttransfer_time] => 0.89
[redirect_time] => 0
[certinfo] => Array ()
[primary_ip] => xx.xx.xx.xx
[primary_port] => 8080
[local_ip] => 127.0.0.1
[local_port] => 3925
[redirect_url] =>)
은 무엇 원인이 될 수있다, 그리고 나는이 문제를 어떻게 해결합니까?
'curl_error ($ ch)'는 뭐래? – anq
필자가 curl_getinfo 사이의 차이점을 알 수있는 한 : 올바르게 작동하지 않는 라이브 서버에 [local_ip]이 설정되어 있지 않습니다. – DrCord
@anq : curl_error ($ ch); 어떤 오류도 반환하지 않습니다. 그것은 빈 페이지를 보여줍니다. – Toni