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:
    http://www.tutors161.com
    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:
    http://www.tutors161.com
    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,375
    Likes Received:
    388
    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:
    http://www.tutors161.com
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice