|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2001-05-03 12:50 UTC] sb at bpm dot ch
 <?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.)
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.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 07:00:01 2025 UTC | 
<?php $output = exec("any_other_program.exe"); echo "$output"; ?> ...will nothing display, too. (it's not an echo-problem!)