note 26182 deleted from function.chdir by tularis
| From: | tularis@php.net | Date: | Thu, 16 Jan 2003 18:31:10 +0000 |
| Subject: | note 26182 deleted from function.chdir by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-42233@lists.php.net to get a copy of this message | ||
>what confused me was the command >order when opening a directory handle >and change to
>another directory.
>
>this seems right:
>1. chdir( towhereyouwanngo );
>2. $fh = opendir( "." );
>3. ... further operations
>4. closedir( $fh );
>
>i tried first to open an directory handle >and then to change directory. this >won't
>work.
It might be a good idea to put an if around "chdir( towhereyouwanngo )". This way your
page won't crash that quick. And you can put error reports on your site...