PHP命令行:max_execution_time和memory_limit [英] PHP command line: max_execution_time and memory_limit
问题描述
快速提问.
如果我从命令行运行php脚本(通过cron作业"php ./somwthing-sync.php"),我是否仍受制于php max_execution_time和memory_limit?
谢谢
内森
(如果您查看 Quick question. If I run a php script from the command-line (through a cron job, "php ./somwthing-sync.php"), am I still bounded to the php max_execution_time and memory_limit? Thanks Nathan if you look at the doc , its says A 0 means unlimited. (If i am not wrong). As for memory_limit, the PHP command line will take the value that is defined in php.ini. This you can easily test and find out by writing code that "eats" memory and setting memory_limit to -1 in php.ini 这篇关于PHP命令行:max_execution_time和memory_limit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! max_execution_time integer
This sets the maximum time in seconds a script is allowed to run before it is
terminated by the parser. This helps prevent poorly written scripts from
tying up the server. The default setting is 30.
When running PHP from the command line the default setting is 0.