Re: Bug #10638: exec(), system(), ... without reply
| From: | Joe Brown | Date: | Thu, 03 May 2001 16:59:55 +0000 |
| Subject: | Re: Bug #10638: exec(), system(), ... without reply | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-53661@lists.php.net to get a copy of this message | ||
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.
<sb@bpm.ch> wrote in message
news:20010503165014.19169.qmail@php2.chek.com...
> From: sb@bpm.ch
> 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: php-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>