Grabbing CSV over cURL in PHP

前端 未结 4 923
别跟我提以往
别跟我提以往 2021-01-17 05:04

Unfortunately, I cannot use either fopen or file_get_contents, so my working script has become a broken one using cURL:

$ch = curl_init();
curl_setopt($ch, C         


        
4条回答
  •  渐次进展
    2021-01-17 05:25

    Set CURLOPT_RETURNTRANSFER to 1 so you get something into $tmp, otherwise curl_exec outputs the csv directly (and before you send the headers). See http://www.php.net/manual/en/function.curl-setopt.php

提交回复
热议问题