imagemagick from php issue
I'm issuing the following command
convert /path/to/image.jpg +repage "/path/output.jpg"
开发者_如何学Go
it works perfectly fine from the command line, but i'm running it from php and its just not working, no output whatsoever.
The user running the web server process (which is almost certainly not the user that owns the script) needs to have write permissions to the destination path.
Alternatively, check out this: http://www.php.net/manual/en/book.imagick.php
You can do the processing right in PHP and avoid the ugly system() call completely.
Check security execution settings in your PHP.ini
file, you must have disabled safe_mode
, then this code was will working good.
echo exec("/path/to/convert /path/to/image.jpg +repage \"/path/output.jpg\"");
精彩评论