Loops with PHP shell_exec() : Use php for() or bash for-do-done?

不问归期 提交于 2019-12-05 20:59:11

Go for bash loop, because shell_exec function is called only once. It will be faster than calling shell_exec multiple times. Enabling functions like exec, shell_exec itself a huge security issue. If someone managed to upload a PHP shell in your server then he can hack your server.

first option execute shell script once and loop in that. which is faster. whereas in second in each loop shell script is calling multiple times which is slower than the first.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!