简体   繁体   中英

Imagemagick convert command in php script not working

I am using php imagemagick and i want to run convert command in php script but it don't work.

My code is here-

<?php
    exec( "/usr/bin/convert new2.png output.jpg");
 ?>

new2.png is in the same directory.

It is a while since I tried this:

1/ php page with you php code called for instance image.php

2/ On another html page use

<img src="image.php">

I assume your image would display if you refreshed your page. When the page loads the image is created but it is not there for the image tag to display.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM