简体   繁体   English

php脚本中的ImageMagick转换命令不起作用

[英]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. 我正在使用php imagemagick,并且我想在php脚本中运行convert命令,但是它不起作用。

My code is here- 我的代码在这里-

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

new2.png is in the same directory. new2.png在同一目录中。

It is a while since I tried this: 自从我尝试过以来已经有一段时间了:

1/ php page with you php code called for instance image.php 1 /与您的php页面一起调用名为image.php的php代码

2/ On another html page use 2 /在另一个html页面上使用

<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. 当页面加载时,将创建图像,但图像标签不会显示该图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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