-q PHP命令行选项有什么作用? [英] What does the -q PHP command-line option do?

查看:96
本文介绍了-q PHP命令行选项有什么作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的主持人有一份定时工作:

I have a cron job on my host:

/ramdisk/bin/php5 -q /home2/sharingi/public_html/scrape/copyV2.php

那简直就是不运行. 支持"告诉我-q是安静模式,这就是为什么我没有收到任何形式的输出电子邮件的原因...

That is just plain not running. The 'support' is telling me that -q is quiet mode and that is why I am not receiving any output emails of any kind...

但是我所有其他cron作业都已经并且正在使用-q运行,并且已经向我发送了输出电子邮件……已经​​有几个月了.

However all my other cron jobs have been and are running with -q and have been sending me output emails... for months.

我正在搜索,但是找不到-q标志的作用,所以你能告诉我吗?

I was searching around but can't find what the -q flag does, so can you tell me?

推荐答案

-q标志禁止显示HTTP标头输出.只要您的脚本本身不向stdout发送任何内容,-q就会阻止cron在每次脚本运行时向您发送电子邮件.例如,将打印和回显发送到stdout.如果要防止cron向您发送电子邮件,请避免使用这些功能.

The -q flag suppresses HTTP header output. As long as your script itself does not send anything to stdout, -q will prevent cron from sending you an email every time the script runs. For example, print and echo send to stdout. Avoid using these functions if you want to prevent cron from sending you email.

这篇关于-q PHP命令行选项有什么作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆