My problem is that web host said there is a program /usr/bin/convert I can use to convert image files, after I call it in my code, it does not seemed to be doing anything. I'm sure the command line is right because I echo the commandline to make sure.
How do I make sure that an external program does actually exists?
I use if (file_exists("/usr/bin/convert")), is there any othe way? Or am I doing something wrong that the system call is not working?
For example:
//convert test.jpg to converted.jpg
$command = "/usr/bin/convert \"test.jpg\" \"converted.jpg\"";
echo $command;
system($command);