> > 
> > You will not be able to do what you propose with a purely 
> PHP solution.  PHP
> > is a server-side technology.  That means all the processing 
> is done at the
> > server, then output to your browser.  PHP, to my knowledge, 
> has no way to
> > inspect your computer's folders.  You would need to look to 
> a client-side
> 
> er??? stick the following in a file (localfiles.php):
> 
> <?php
> 
> function readDirWin($dir) {
>     $d = dir($dir);
>     while (false !== ($entry = $d->read())) {
>         if($entry!="." && $entry!="..") {
>             echo ($entry = $dir."\\".$entry), "\n";
>             if(is_dir($entry)) {
>                 readDirWin($entry);
>             }
>         }
>     }
>     $d->close();
> }
> var_dump( readDirWin("C:") );
> 
> ?>
> 
> and call it like so:
> C:\path\to\your\CLI\php.exe C:\path\to\your\localfiles.php


Perhaps I misunderstand what the OP wanted.  I thought he was running a
webserver somewhere, and that he wanted his remote webserver to be able to
grab a file listing on his local machine by just visiting a webpage there.

Of course PHP can query the local filesystem.  I thought he wanted it to
query a remote filesystem.

JM

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to