phpbar.de logo

Mailinglisten-Archive

[php] exec() unter Windows-NT ?

[php] exec() unter Windows-NT ?

Thomas Feyrer Dante_(at)_altmuehlnet.de
Wed, 28 Jul 1999 10:41:06 +0200


At 10:17 28.07.99 +0200, Thomas Schneider wrote:
>Thorsten Hock wrote:
>> I tried to setup a workaround for the problem with the mail() function
>> under Windows-NT. My idea was to call 'xmail' with the exec() command. Now
>> I'm ready with the script, but to my big surprise the exec() function is
>> not working. Nothing happens. Neither the exec(), nor the system() or the
>> passthru() command is working. and there are no errors. Any ideas ?
>
>Try 
><?
>echo `dir`;  // executes the internal DIR command of COMMAND.COM
>?>
>as a startingpoint for futher investigation...

Hi,
a popen() could help too, the advantage with it is, that you mustn't put
everything into the exec()/system()/passthru()-command!

<?
$pp = popen( "c:\\xmail\\xmail.exe", "w" ) or die( "Error starting xmail!" );
fputs( $pp, "To: foo_(at)_bar.com" );
fputs( $pp, "From: bar_(at)_foo.com" );
...
pclose( $pp );
?>

Bye
 Dante



php::bar PHP Wiki   -   Listenarchive