get shell command output

From: Date: Thu, 05 Oct 2000 05:58:51 +0000
Subject: get shell command output
Groups: php.windows 
Request: Send a blank email to php-windows+get-2945@lists.php.net to get a copy of this message
Hi, it does not work for me either. ISAPI either crashes or hangs. CGI is not any more successfull. I use the PHP 4.0.3-Dev Binaries from php4win.de. Somebody once mentioneds it could not work because of an unresolved issue in PHP (or was it Zend) on Windows. Florian 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??? -- Florian Clever fc@clever-soft.com http://www.Clever-Software-Solutions.de/ PGP Key @ ldap://certserver.pgp.net/ * Only 19,999 lines of C++ to my next ski trip... *

« previous php.windows (#2945) next »