Simple "Convert" won't work
Posted: 2007-07-16T18:15:20-07:00
Somebody please help.
I have the following code in PHP.
----------------------------------------------
if (file_exists('image.jpg')) {
echo 'file exists';
}
exec("usr/local/bin/convert image.jpg image.gif");
if (file_exists('image.gif')) {
echo 'it worked';
} else {
echo 'no you fool, doesnt work';
}
----------------------------------------------
The image resides in the same folder as my code. As you might have guessed, I get the "file exists" and then "doesnt work" message.
What is wrong?
Thanks.
I have the following code in PHP.
----------------------------------------------
if (file_exists('image.jpg')) {
echo 'file exists';
}
exec("usr/local/bin/convert image.jpg image.gif");
if (file_exists('image.gif')) {
echo 'it worked';
} else {
echo 'no you fool, doesnt work';
}
----------------------------------------------
The image resides in the same folder as my code. As you might have guessed, I get the "file exists" and then "doesnt work" message.
What is wrong?
Thanks.