curl -p --insecure "ftp://127.0.0.1:21111" --user "test:test" -Q "-RNFR /home/text.txt" -Q "-RNTO /data/text.txt"这个curl命令,请问下怎么用PHP的curl方法写出来
2 回答
慕莱坞森
TA贡献1810条经验 获得超4个赞
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, TRUE);
curl_setopt($ch, CURLOPT_NOBODY, TRUE); // remove body
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$head = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
- 2 回答
- 0 关注
- 712 浏览
添加回答
举报
0/150
提交
取消