Home >Backend Development >PHP Tutorial > php 在linux 下 执行exec无效,

php 在linux 下 执行exec无效,

WBOY
WBOYOriginal
2016-06-13 12:32:451027browse

php 在linux 下 执行exec无效,在线等!!!
php 在linux 下 执行exec无效,直接在linux下输入命令则正常,网上查了一下好像是权限的问题,那如何让PHP以ROOT权限执行系统命令呢???
php中:
exec('java -jar /usr/jodconverter-2.2.2/lib/jodconverter-cli-2.2.2.jar /usr/userup/13SB2511-a22.doc /usr/userup/13SB2511-a22.pdf');
无效
在linux命令中:
java -jar /usr/jodconverter-2.2.2/lib/jodconverter-cli-2.2.2.jar /usr/userup/13SB2511-a22.doc /usr/userup/13SB2511-a22.pdf
成功

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn