echo typically is not a program.
It is a command in the CMD.exe or COMMAND.com programs.

$output=exec("cmd -c echo hello"); //should produce the desired effect.

Why piping output to a file changes this fact, is beyond me.

<[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> From:             [EMAIL PROTECTED]
> Operating system: Windows 2000
> PHP version:      4.0.5
> PHP Bug Type:     IIS related
> Bug description:  exec(), system(), ... without reply
>
> <?php
> $output = exec("echo hello");
> echo "$output";
> ?>
>
> ...will nothing display!
> (that's wrong!)
>
> <?php
> $output = exec("echo hello > hello.txt");
> ?>
>
> ...will create a file named hello.txt with the value hello.
> (that's fine.)

Strange IMO, not fine.

>
> So the function exec() works properly but it gives no value back. The same
problem occures in the function system() or in the backticks.
>
> I'm using Windows 2000 with IIS.
>
>
>
> --
> Edit Bug report at: http://bugs.php.net/?id=10638&edit=1
>
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to