全球主机交流论坛

标题: 如何用PHP运行docker命令? [打印本页]

作者: dahai0405    时间: 2023-12-16 15:25
标题: 如何用PHP运行docker命令?
只需要用h5表单+php运行 下面的命令

docker run singlefile "www.baidu.com" > /root/baidu.html

如何实现?

AI教的无济于事!没有权限运行 docker run 命令



作者: wlz    时间: 2023-12-16 15:34
仅供参考

https://www.afengblog.com/php-executes-shell-script-or-bash-script.html
作者: liugogal    时间: 2023-12-16 15:39
shell_exec
作者: HOH    时间: 2023-12-16 15:41
php默认安全模式是不允许执行的
作者: 职业菜鸟    时间: 2023-12-16 15:48
  你这不是自问自答吗。  你自己都说了 没权限。。。
作者: 似毛非毛    时间: 2023-12-16 15:56
什么东西php不能干。非要docker执行。
作者: dahai0405    时间: 2023-12-16 17:27
liugogal 发表于 2023-12-16 15:39
shell_exec

试了没戏!
作者: dahai0405    时间: 2023-12-16 17:48
wlz 发表于 2023-12-16 15:34
仅供参考

https://www.afengblog.com/php-executes-shell-script-or-bash-script.html

多谢搞定!




欢迎光临 全球主机交流论坛 (https://www.iloc.eu.org/) Powered by Discuz! X3.4