why can not i run command line in php?
Posted: 2014-04-10T02:34:48-07:00
why can not i run command line in php?
Code: Select all
<?php
/*
i want to use comand line to compress image in php
this code bellow works in cmd but does not works in php
*/
// in cmd type and run is ok
// convert -strip -quanlity 75% 0.jpg 00.jpg
// in php does not works
shell_exec('convert -strip -quanlity 75% 0.jpg 00.jpg');
// or
exec('convert -strip -quanlity 75% 0.jpg 00.jpg');
// but this is ok:
exec('convert -strip 0.jpg 00.jpg');
// why?
?>