在Joomla中使用exec PHP执行ImageMagick
我有以下代码:在Joomla中使用exec PHP执行ImageMagick,php,joomla,imagemagick,exec,Php,Joomla,Imagemagick,Exec,我有以下代码: ... $last_id = $row->id; $justname2 = pathinfo($_FILES["pdf"]["name"], PATHINFO_FILENAME); $input2 = "C:/wamp/www/apuntes/components/com_djclassifieds/images/item/WM_".$_FILES["pdf"]["name"]; $output2 = "C:/wamp/www/apuntes/components/com
...
$last_id = $row->id;
$justname2 = pathinfo($_FILES["pdf"]["name"], PATHINFO_FILENAME);
$input2 = "C:/wamp/www/apuntes/components/com_djclassifieds/images/item/WM_".$_FILES["pdf"]["name"];
$output2 = "C:/wamp/www/apuntes/components/com_djclassifieds/images/item/".$last_id."_".$justname2.".png";
$justname3 = $last_id."_".$justname2;
exec('C:\"Program Files"\ImageMagick-6.8.9-Q16\convert -density 400 '.$input2.'[0] -resize 25% '.$output2);
它在我的Wamp服务器上运行得非常好
问题是当我把它上传到真正的服务器时,因为我没有C:中的ImageMagick,而是在/libraries中。所以我试了一下:
exec(JPATH_ROOT."/libraries/ImageMagick-6.8.9-Q16/convert -density 400 ".$input2." -resize 25% ".$output2);
但它不起作用。还尝试了JPATH_网站
我必须说ImageMagick没有安装在服务器上,我只是上传了安装文件夹
有什么有用的线索或建议吗?嗯……我找到了解决办法。首先,我需要在服务器上安装ImageMagick。然后,我需要重新启动服务器。最后,使用这个通道:exec(/usr/bin/convert-density 400“$input2.”-resize 25%“$output2”);它工作了。嘿,它不适合我。通过php它工作得很好。请尽快给我解决方案。我已经在我的系统中安装了imageMagick。