exec() with php code

Discussion in 'PHP' started by php, Apr 6, 2007.

  1. #1
    Hello,

    i face some problem when i use the function exec() with php code..

    maybe i use it in rong way .....but i need to include external program(which is extract the root of arabic word) then go to the search program written in php lang ...if u have another way to do that please tell me ..

    thanks for your help
     
    php, Apr 6, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Maybe we could figure out if you'd show us your code.
     
    nico_swd, Apr 6, 2007 IP
  3. php

    php Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    when i use system or exec function my code like that

    <?
    $var=exec('C:\\folder\file.pro'); /* file in prolog code */
    print "$var";
    ?>

    but in the browser ....no result:confused: how i can solve it???
     
    php, Apr 7, 2007 IP
  4. php_daemon

    php_daemon Active Member

    Messages:
    34
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    95
    #4
    Try,
    
    $var=exec('path\to\prolog\prolog.exe C:\folder\file.pro');
    
    Code (markup):
    I'm not familiar with prolog, so I'm not exactly sure if it's prolog.exe, but you get the idea.
     
    php_daemon, Apr 7, 2007 IP
  5. php

    php Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    thanks php_daemon

    i try that and it works in the hello.pl (perl program)
    but when i try to prolog program,i still wait the download browser without any result i write this code for prolog ..is it right?

    $last=system('C:\VIP\BIN\WIN\32\VIP.exe C:\VIP\BIN\WIN\32\ARABIC.PRO');

    i'm using visual prolog on windos.:confused:
     
    php, Apr 10, 2007 IP
  6. php

    php Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    thanks php_daemon

    i try that and it works in the hello.pl (perl program)
    but when i try to prolog program,i still wait the download browser without any result i write this code for prolog ..is it right?

    $last=system('C:\VIP\BIN\WIN\32\VIP.exe C:\VIP\BIN\WIN\32\file.PRO');

    i'm using visual prolog on windos.:confused:
     
    php, Apr 10, 2007 IP
  7. php

    php Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    thanks php_daemon

    i try that and it works in the hello.pl (perl program)
    but when i try to prolog program,i still wait the download browser without any result i write this code for prolog ..is it right?

    $last=system('C:\VIP\BIN\WIN\32\VIP.exe C:\VIP\BIN\WIN\32\file.PRO');

    i'm using visual prolog on windos.:confused:[/QUOTE]
     
    php, Apr 10, 2007 IP