dougong2306 2018-01-22 14:26
浏览 117

在PHP cURL中设置各种CURLOPT_XXX常量选项的顺序真的很重要吗?

While using cURL in PHP, we usually set various curl options through function curl_setopt(). I am curious to know whether order of different constant options matters or not. Do we really need to care of which constants must come before or after other constants?

Any difference?

curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);

or

curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
  • 写回答

1条回答 默认 最新

  • doumi9661 2018-01-22 14:29
    关注

    No, you can set them in any order you like.

    评论

报告相同问题?