我必须使用imagemagick
convert
来自 php 的命令。所以我正在使用shell_exec
,但它的输出是空字符串。我知道命令 convert 不会在 STDOUT 上打印任何内容,但convert
也没有达到所需的输出。也exec
不起作用。这些命令从 shell 或 php 命令行运行良好。可能是什么问题?
编辑:添加 2>&1,我了解到 convert 抛出错误:missing an image filename
/a5d98168a524a331c5e06d60096debd63cbdce1f.jpg'@error/convert.c/ConvertImageCommand/2970。where the full command is
转换 /var/www/weblog/web/uploads/poster/a5d98168a524a331c5e06d60096debd63cbdce1f.png /var/www/weblog/web/uploads/poster/a5d98168a524a331c5e06d60096debd63cbdce1f.jpg`。