curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
from-data数据的为:$data = [ 'name' => 'aaa', 'sex' => 1];
x-www-form-urlencoded时的数据则要变为 http_build_query($data);