capsx Posted July 27, 2003 Report Share Posted July 27, 2003 kaa lai nolasa ko man atgriezh komanda: shell_exec("wget ..."); scriptu palaizh ieksh shella; Link to comment Share on other sites More sharing options...
3ps Posted July 28, 2003 Report Share Posted July 28, 2003 nezinu īsti ko tu ar to visu gribēji, bet shell_exec atgriež outputu. uz windows darīju tā: uztaisīju skriptu first.php iekš c:phpscriptsfirst.php teitan ir skripts first.php: <?php echo shell_exec('dir'); ?> tad devos uz c:php un rakstīju php.exe (vai vienkārši php vai arī c:phpphp.exe) un tad norādīju uz skriptu un spiedu enter: c:php>php c:phpscriptsfirst.php Content-type: text/html X-Powered-By: PHP/4.3.1 Volume in drive C has no label ... Directory of c:phpscripts 2003.07.28 06:53 <DIR> . ... [seko direktorijas satura uzskaitījums ] Varbūt ko noderīgu te atrod: http://www.phpfreaks.com/tutorials/86/0.php Link to comment Share on other sites More sharing options...
Venom Posted July 28, 2003 Report Share Posted July 28, 2003 $out=shell_exec('dir'); echo $out; $out=`dir`; echo $out; Link to comment Share on other sites More sharing options...
capsx Posted July 28, 2003 Author Report Share Posted July 28, 2003 $out=shell_exec('dir');echo $out; $out=`dir`; echo $out; tur jau taa lieta ka shitas neko neatgriezh ... scripts ieksh shella met aaraa output bet zemaak esoshais $string=shell_exec("wget ..."); neko neatgriezh Link to comment Share on other sites More sharing options...
Venom Posted July 28, 2003 Report Share Posted July 28, 2003 varētu būt tā, ka shell_exec atgriež pēdējo rindu, bet tā varētu būt "n" tukšrinda, pamēģini visādus exec(), passthru(), popen(), system(), vai izmanto backtikus (`dir`), un ķer outputu ar output bufferinga (ob_*, īpaši ob_getcontents()) funckijām. Link to comment Share on other sites More sharing options...
Recommended Posts