【问题标题】:How can I convert this cURL command to php code如何将此 cURL 命令转换为 php 代码
【发布时间】:2013-06-25 20:12:10
【问题描述】:

我似乎找不到对这个 cURL 命令使用的 LH 命令的任何引用——所以我不完全确定如何将它翻译成 php

$ curl -LH "接受:文本/参考书目;style=mla;locale=fr-FR" http://dx.doi.org/10.1038/nrd842

【问题讨论】:

  • 你的意思是使用PHP的curl_*函数吗?

标签: php curl libcurl


【解决方案1】:

curl -LH 只是两个标志 LH

见:http://curl.haxx.se/docs/manpage.html

-L = 位置

-H = 标题

在您的代码中,您应该将您的标志交换为-HL 或交换您的参数值。

【讨论】:

    猜你喜欢
    • 2022-01-16
    • 1970-01-01
    • 2012-05-10
    • 2014-08-28
    • 2021-10-08
    • 2013-12-24
    • 2016-03-07
    • 2019-03-25
    • 1970-01-01
    相关资源
    最近更新 更多