0
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方法写出来

2019-01-11 提问
2 个回答
0

已采纳

没有解决,用shell去执行了

0

$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);

撰写答案

推广链接