Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: exec() Problems

  1. #1
    Regular Coder mic2100's Avatar
    Join Date
    Feb 2006
    Location
    Scunthorpe
    Posts
    562
    Thanks
    15
    Thanked 28 Times in 27 Posts

    Question exec() Problems

    I am trying to execute a .exe file but i keep getting the same problem

    PHP Code:

    $file 
    "C:\autoDialer.exe";

    exec($file); 
    I don't need any information to be passed to or from this because it only presses the shortcut keys to dial the phone.

    Parse error: parse error, unexpected ':' in C:\AppServ\www\SJMDBv2\autoDialer.php on line 3
    this is the error i get. I need to know if i am writing this correctly of do i need to use some other functions.

    How do i write the string for a windows file location.
    Last edited by mic2100; 04-24-2006 at 12:45 PM.

  • #2
    XPc
    XPc is offline
    New to the CF scene
    Join Date
    Apr 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    try

    $file = "start c:\autodialer.exe";

    From what i see exec will run command line programs, Either making you need to have a batch script or write the program for console.

    Not 100% sure....

    But that should work...

    If not then

    http://us2.php.net/function.exec

    Theres some posts about windows there.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •