problem regarding executing programs

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mourya
Forum Newbie
Posts: 1
Joined: Mon Dec 07, 2009 4:17 pm

problem regarding executing programs

Post by mourya »

Hello,
I wanted to execute external applications like winrar, notepad through scripting language, i tried to find a way with JSP but it was too complicated for me. Then i saw few examples with exec() command in PHP. I installed XAMPP on my system and tried the following php code

<?php
$tmp = exec("C:\\Program Files\\GraphicsMagick-1.3.7-Q8\\gm.exe convert c:\\Image\\ortho.jpg c:\\Image\\file1.jpg", $results);
?>

I am not getting any error, at the same time there is no output file in the Image folder. I gave permissions for Everyone for gm.exe as well as Image folder. Am i making any mistakes ?
Post Reply