我必須使用imagemagick
convert
命令從PHP。所以我使用shell_exec
,但輸出是空字符串。我知道命令convert不會在STDOUT上打印任何內容,但是convert
的期望輸出也沒有實現。 exec
也不起作用。這些命令可以在shell或php命令行下正常運行。可能是什麼問題?php shell_Exec不工作而命令在shell中工作
EDIT:添加2> & 1,I得知轉換拋出一個錯誤:missing an image filename
/a5d98168a524a331c5e06d60096debd63cbdce1f.jpg」 @錯誤/ convert.c/ConvertImageCommand/2970。 where the full command is
convert /var/www/weblog/web/uploads/poster/a5d98168a524a331c5e06d60096debd63cbdce1f.png/var/www/weblog/web/uploads/poster/a5d98168a524a331c5e06d60096debd63cbdce1f.jpg`。
在命令後面查看'error.log'或添加'2>&1'。 – mario 2012-01-10 18:29:17
@mario:我已更新問題 – prongs 2012-01-10 18:31:29
檢查應用程序對目錄具有寫入權限。 – 2012-01-10 18:35:34