Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在windows中的批处理文件中运行wget命令行_Windows_Batch File_Wget - Fatal编程技术网

在windows中的批处理文件中运行wget命令行

在windows中的批处理文件中运行wget命令行,windows,batch-file,wget,Windows,Batch File,Wget,我在windows中使用wget,它可以很好地处理基本的http请求,但当我运行下面的命令时,它基本上是snom手机上的一个动作URL。它没有运行它,并在链接下面给我消息。有人知道怎么解决这个问题吗 操作URL: http://Phone-IP-Address/dummy.htm?settings=save&setting_server=http://WEB-Server-IP/settings.xml&store_settings&=save 结果 syswgetr

我在windows中使用wget,它可以很好地处理基本的http请求,但当我运行下面的命令时,它基本上是snom手机上的一个动作URL。它没有运行它,并在链接下面给我消息。有人知道怎么解决这个问题吗

操作URL:

 http://Phone-IP-Address/dummy.htm?settings=save&setting_server=http://WEB-Server-IP/settings.xml&store_settings&=save
结果

syswgetrc = C:\Program Files (x86)\GnuWin32/etc/wgetrc
--2013-03-12 10:10:53--  
Connecting to `192.168.1.100:80`... connected.
HTTP request sent, awaiting response... 200 Ok
Length: 0 [text/html]
Saving to: `dummy.htm@settings=save'

[ <=>                                   ] 0           --.-K/s   in 0s

2013-03-12 10:10:53 (0.00 B/s) - `dummy.htm@settings=save' saved [0/0]

'setting_server' is not recognized as an internal or external command, operable program or batch file.
'store_settings' is not recognized as an internal or external command, operable program or batch file.
syswgetrc=C:\ProgramFiles(x86)\GnuWin32/etc/wgetrc
--2013-03-12 10:10:53--  
正在连接到'192.168.1.100:80'。。。有联系的。
HTTP请求已发送,正在等待响应。。。200行
长度:0[text/html]
保存到:`dummy。htm@settings=保存'
[]0--.-K/s在0中
2013-03-12 10:10:53(0.00b/s)-‘假人。htm@settings=保存已保存[0/0]
“设置_服务器”未被识别为内部或外部命令、可操作程序或批处理文件。
“存储设置”不被识别为内部或外部命令、可操作程序或批处理文件。

字符是一种特殊字符,告诉shell在一行中执行多个命令。因此,您必须用双引号将URL括起来:

"http://Phone-IP-Address/dummy.htm?settings=save&setting_server=http://WEB-Server-IP/settings.xml&store_settings&=save"
这样,shell就不会试图将其作为命令的一部分进行解析,而是将其视为单个参数、单个字符串块,因此
&
字符也不会被视为命令分隔符

它在以下方面具有特殊含义:

  • 一个命令将在后台异步运行该命令
  • &&
    表示逻辑和

我建议使用URL百分比编码,参见。