1
我使用cURL
来提交表单,并使用PHP的http_build_query()
来形成查询字符串。我想知道为什么表单没有提交,然后我回应查询字符串只查询查询字符串中的'¶'和'ð`。http_build_query在查询字符串中输入奇怪的字符
$post_data = array('terms' => 'true',
'ethnicity' => 0,
'param0' => 'Lance',
'param1' => 'Newman');
$post_data = http_build_query($post_data);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
echo $post_data;
返回
terms=trueðnicity=0¶m0=Lance¶m1=Newman
我试图把
header('Content-Type: text/html; charset=utf-8');
在页面的顶部,没有运气
php文件它也保存为UTF8? – tttony 2014-08-31 07:50:56