|
Posted by Csaba Gabor on 12/01/65 11:52
Chung Leong wrote:
> Richard Levasseur wrote:
> > It would seem you're out of luck, then, at least for windows. In *nix
> > you might be able to use the "_" env variable. You can always require
> > a command line switch to be set to specify the mode. The only other
> > idea i have is to figure out where stdout is going.
>
> Hmmm, that should work. GUI apps on Windows have null stdout. An
> attempt to write to it would fail:
>
> $stdout = fopen("php://stdout", "wb");
>
> if(@fwrite($stdout, "Error: the dingo ate my baby\n") == 0) {
> // do something else
> }
thank you, Thank You, THANK YOU
Hey Chung, majorly cool!
<?php
$stdout = fopen("php://stdout", "wb");
if(@fwrite($stdout, " \x08") == 0) {
// php-win
} else {
// some other invocation
}
?>
Thanks again,
Csaba
Navigation:
[Reply to this message]
|