1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Executing a external file from PHP

Discussion in 'PHP' started by Bhullarz, Feb 24, 2009.

  1. Bhullarz

    Bhullarz New Member

    Joined:
    Nov 15, 2006
    Messages:
    253
    Likes Received:
    13
    Trophy Points:
    0
    Occupation:
    System Manager
    Home Page:
    Hi ! I am trying to execute an external file i.e abc.exe from php but it is not working.
    I have used the following code:
    Code:
    <?php
    	exec("executable1.exe -o arg1 arg2");
    	shell_exec("executable1.exe -o arg1 arg2");
    	system("executable1.exe -o arg1 arg2");
    ?>
    
    None of the commands seem to be working. What's wrong in the code?
     
  2. Bhullarz

    Bhullarz New Member

    Joined:
    Nov 15, 2006
    Messages:
    253
    Likes Received:
    13
    Trophy Points:
    0
    Occupation:
    System Manager
    Home Page:
    No one replied yet. But I have solved this problem. so no worries
     
  3. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    Why dont you share it here so if anyone searching can find it easily
     
  4. Bhullarz

    Bhullarz New Member

    Joined:
    Nov 15, 2006
    Messages:
    253
    Likes Received:
    13
    Trophy Points:
    0
    Occupation:
    System Manager
    Home Page:
    It may sound funny to all. I developed a software in Windows and transferred to server which is Linux Server. This was the reason EXE files were not working there.
     

Share This Page