Re: how: Output of 'ls' as an array
| From: | Dan Kuykendall | Date: | Thu, 01 Jun 2000 16:12:58 +0000 |
| Subject: | Re: how: Output of 'ls' as an array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-832@lists.php.net to get a copy of this message | ||
OH, holy cow. How did I miss that in the documentation?!
OK, I will go hide under a rock for awhile and repeat 500 times "I will
read the doc carefully before asking stupid questions"
Stewart Taylor wrote:
>
> [ignore]
> I haven't tried this myself, but you should be able to create a pipe using
> popen
> Then use fgets to read the data ls produces
>
> http://www.php.net/manual/function.popen.php
> [stop ignore]
>
> Actually the exec command is more appropirate.
> http://ntwl1112/php%20manual/function.exec.html
>
> -Stewart
> -----Original Message-----
> From: Dan Kuykendall [mailto:dan@kuykendall.org]
> Sent: 01 June 2000 16:20
> To: php-general@lists.php.net
> Subject: [PHP-GENERAL] how: Output of 'ls' as an array
>
> How would I save the output of 'ls -l' as an array. I need to be able to
> take each line and save it as an entry in an array for use later. Does
> anyone know how this can be done?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net