opendkim命令不适用于PHP
我在Linux终端上运行这个命令opendkim命令不适用于PHP,php,linux,Php,Linux,我在Linux终端上运行这个命令opendkim-genkey--domain=example.com--selector=example--subdomains,它工作正常,但当我尝试在PHP页面中运行它时 shell_exec(“opendkim genkey--domain=example.com--selector=example--subdomains”) 这不管用。。 我还尝试在我的php页面中运行另一个命令,并得到结果。我可以看到三种解释: 未找到opendkim genkey,
opendkim-genkey--domain=example.com--selector=example--subdomains
,它工作正常,但当我尝试在PHP页面中运行它时
shell_exec(“opendkim genkey--domain=example.com--selector=example--subdomains”)代码>
这不管用。。
我还尝试在我的php页面中运行另一个命令,并得到结果。我可以看到三种解释:
- 未找到opendkim genkey
,因为环境变量不同:请使用绝对路径
opendkim-genkey
生成密钥文件)您查看日志了吗?谢谢@Pierre JeanBergeron,你的回答对我很有帮助,事实上我是堆栈溢出的新手,所以我无法投票支持你。你是对的。一个可能的原因是Opendkim genkey将为需要对Web文档目录具有写入权限的用户生成密钥文件