【问题标题】:wget strips parameters from urlwget 从 url 中去除参数
【发布时间】:2022-01-21 03:31:56
【问题描述】:

我在 Directadmin 中使用以下命令:

/usr/bin/wget -O /dev/null https://www.domain-name.com/index.php?parameter=extrap&task=update

现在,当我发送输出电子邮件时,它显示连接到 URL,但没有 &task=update

【问题讨论】:

    标签: cron wget directadmin


    【解决方案1】:

    在您似乎正在使用的 *nix 操作系统中,& 是一个将进程发送到后台的特殊字符。您可以通过引用 URL 来转义它:

    /usr/bin/wget -O /dev/null "https://www.domain-name.com/index.php?parameter=extrap&task=update"
    # Here --------------------^------------------------------------------------------------------^
    

    【讨论】:

    • 谢谢。这很有帮助。
    猜你喜欢
    • 1970-01-01
    • 2021-11-13
    • 1970-01-01
    • 1970-01-01
    • 2016-05-20
    • 1970-01-01
    • 2012-01-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多