[lug] quick php question for including cli output

Eric Kilfoil ekilfoil at viawest.net
Wed May 30 15:44:39 MDT 2001


Use the 'passthru' command to do this:

<?
passthru('/bin/du -sH /home');
?>

Eric

On Wed, 30 May 2001 charles at lunarmedia.net wrote:

> i'd like to take the output from a command and echo it to a webpage using
> php. i had thought that something like
>
> $message = `du -sH /home`;
>
> would put the info into a variable that i could then call via echo. to say
> the least, its just not working out for me. i am sure this is a simple
> one, and in fact, i've done it before, but i've lost my reference and i
> can't find the info on php.net
>
> thanks -cjm
>
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>




More information about the LUG mailing list