Page 1 of 1

Huhu ! - I have problems with calling an extern prog.

Posted: Tue Jan 07, 2003 6:12 am
by Super-Zinken
Hello everybody !
Ic used the following Code:

<html>
<?php
exec("c:\ProgZ\write.exe");
?>
</html>

But i doenst work, no write is opening.

I use IE on Windows system.

Perhaps someone can help me, THX !

Posted: Tue Jan 07, 2003 10:46 am
by volka
try exec("c:/ProgZ/write.exe"); or at least exec("c:\\ProgZ\\write.exe");. A single ''' escapes the special meaning of next the character but there is nothing special about 'P' and 'w' ;)

hmm..

Posted: Tue Jan 07, 2003 1:03 pm
by Super-Zinken
I did, but althought it doenst work.

Posted: Tue Jan 07, 2003 1:19 pm
by volka
http://www.php.net/manual/en/function.exec.php
string exec ( string command [, array output [, int return_var]])
maybe you should check the return value and/or pass the output parameter to the function and check the value as well.

Code: Select all

is_file('c:/ProgZ/write.exe') or die('does not exist');
before the exec might be helpful, too

Huhu !

Posted: Tue Jan 07, 2003 1:54 pm
by Super-Zinken
the file exists.
perhaps we can chat.
My ICQ#: 178260546

Posted: Tue Jan 07, 2003 2:18 pm
by oldtimer
Try putting your command into a string.

$string="c:/ProgZ/write.exe";
exec($string);

I use it like that using system command.

Posted: Tue Jan 07, 2003 2:32 pm
by Super-Zinken
ojeeeeeeeee !
Notjing work !
even that with the String did not work.
Hey, you Avatar loos funny !