Re[3]: [PHP-WIN] get shell command output

From: Date: Wed, 04 Oct 2000 13:43:31 +0000
Subject: Re[3]: [PHP-WIN] get shell command output
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-2933@lists.php.net to get a copy of this message
Alexander: I did this and worked fine: <?php $d = dir; $t = htmlentities($d); // Converts special chars to html tags. echo "<PRE>$t</PRE>"; ?> In your examples, the PHP tag was <? and not <?php, I'm not sure if this might be the problem. Saludos, Pablo Vera _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Tuesday, October 03, 2000, 10:43:44 AM, Alexander wrote: >>> php4/winnt40/apache1.3.9 >>> >>> I can't get shell command output >>> When I try ... >>> >>> <? >>> $t = system("dir"); >>> echo "<pre>$t</pre>; >>> ?> >>> >>> ... or ... >>> >>> <? >>> $t = dir; >>> echo "<pre>$t</pre>; >>> ?> >>> >>> ... I get empty html. >>> but when i try ... >>> >>> <? >>> $t = dir>d:\1.txt; >>> echo "<pre>$t</pre>; >>> ?> >>> >>> ... i get d:\1.txt >>> How can't I get shell command output???

« previous php.windows (#2933) next »