Php curl:未指定URL--F:未找到命令

Php curl:未指定URL--F:未找到命令,php,linux,bash,curl,Php,Linux,Bash,Curl,您好,我正在使用以下代码从bash脚本在Linux上上载文件: curl -F aok=2 -F Name='azko' -F dir="@path_to_file;filename=zou.odp" -F "tag=1234" -F "OK=2" -F ecoTime=1 -F -F ckx=no "http://blabla" 但是,我收到的错误是: curl: no URL specified! curl: try 'curl --help' or 'curl --manual'

您好,我正在使用以下代码从bash脚本在Linux上上载文件:

curl -F aok=2 -F Name='azko' -F dir="@path_to_file;filename=zou.odp" 
 -F "tag=1234" -F "OK=2" -F ecoTime=1 -F 
 -F ckx=no "http://blabla"
但是,我收到的错误是:

curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
./up.sh: line 2: -F: command not found
./up.sh: line 3: -F: command not found
我已经安装了curl7.47.0

到目前为止,我试图将\放在行的末尾,但错误仍然不断出现。我错过了什么

当我直接用\placed将此代码复制到终端时,它可以工作,但这次会出现另一种错误

curl: (43) A libcurl function was given a bad argument

我猜这是由于目录问题造成的?

您使用的是没有参数的-F-F。 尝试:

此外,如果命令继续执行,您还可以将整个命令写入一行(见上文),或将
\
添加到该行的末尾:

curl -F aok=2 -F Name='azko' -F "dir=@path_to_file;filename=zou.odp" \
 -F "tag=1234" -F "OK=2" -F ecoTime=1 \
 -F ckx=no "http://blabla"

啊。。谢谢你的双F-F。。。。然而,即使我更正了代码,它仍然会给出“curl:(43)libcurl函数被赋予一个错误参数”错误。。当我说-F dir=“@/commoncomp/Downloads/12;filename=zou.odp”时,它不起作用,但一旦我切换到-F dir=“@/commoncomp/Downloads/12/zou.odp”,它就起作用了。但是,我想用它来提供一个目录,因为一旦链接,我上传几个文件会容易得多。尝试设置“环绕整个语句。我已经更新了上面的两个语句。错误:
dir=“@path\u to\u file;filename=zou.odp“
右:
”dir=@path\u to\u文件;filename=zou.odp“
谢谢:)现在一切都好了
curl -F aok=2 -F Name='azko' -F "dir=@path_to_file;filename=zou.odp" \
 -F "tag=1234" -F "OK=2" -F ecoTime=1 \
 -F ckx=no "http://blabla"