[CS-FSLUG] Shell command in PHP script

Josiah Ritchie jritchie at bible.edu
Fri Mar 26 14:02:16 CST 2004


K Montgomery scripted ::

>I think you could just use the system() function, as in:
>
>system("ls -l /tmp");
>
>To get the output of the command, use the backticks operator:
>
>$newvariable = `ls -l /tmp`;
>echo $newvariable;

Thanks you, that's just about exactly what I was looking for. 

JSR/




More information about the Christiansource mailing list