|
Posted by Senator Jay Billington Bulworth on 11/14/54 11:22
michelbh@gol.com (Michel Bouchet) wrote in news:42e5d181.3288859
@nnrp.gol.com:
> Hi,
>
> I am using the PHP shell_exec function like this :
>
> $TmpVar=shell_exec('du -sk /mnt/MyDevice/MyFolder/*');
>
> Even though I am supposed to get about ten lines, for some reason I
> ignore I only get one (one of the subfolders under MyFolder/ instead
> of all of them).
Look into using popen() and fgets() instead, this way you will get all of
the output. If the command you're running is going to output several
kilobytes of data, please keep this note..
http://php.net/manual/en/function.popen.php#50408
...in mind.
hth
--
Bulworth : PHP/MySQL/Unix | Email : str_rot13('f@fung.arg');
--------------------------|---------------------------------
<http://www.phplabs.com/> | PHP scripts, webmaster resources
Navigation:
[Reply to this message]
|