🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
``` <?php $id = 1; $content = 'content'; $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "http://localhost/test", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_SSL_VERIFYPEER => 0, // 是否检查SSL证书,Inspection of the source of SSL certificate CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "{ \r\n \"id\": \"$id\", \r\n \"content\": \"$content\"\r\n }", CURLOPT_HTTPHEADER => array( "cache-control: no-cache", ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ```