for your specific example, check out http://www.php.net/manual/en/function.readdir.php lots of simple functions like that have already been written for you...the joy of php ;-) -jack macky wrote: > > im using PHP + APACHE on Linux Box > > i wonder what command in PHP can i use to execute Unix commands.... > > i got to read also exec(), system(), passthru(),popen(), and > excapeshellcmd() > > but what if i want to use the command "ls" and store ALL output in a > variable.... > > i thought system() is enough.... but system function outputs the result on > the page... > > actual code: > <%php > $var = system("ls /tmp/"); > %> > > if u can see no "echo" command.. > > lastly is there a possibility that resulting output from "ls" will be placed > in a list... or array.....(since PHP doesnt have list) > > : ( > > thanks in advance > > -- > ---------------------------------------------------------------------- > The information contained in this message (including any attachments) > is confidential and intended solely for the attention and use of the > named addressee(s). It must not be copied, distributed nor disclosed > to any person. If you are not the intended recipient, please delete > it from your system and notify sender immediately. Any disclosure, > copying or distribution thereof or any action taken or omitted to be > taken in reliance thereon is prohibited and may be unlawful. > ---------------------------------------------------------------------- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]