Re: fread() and windows directory permissions

From: Date: Tue, 08 May 2001 23:03:52 +0000
Subject: Re: fread() and windows directory permissions
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-7369@lists.php.net to get a copy of this message
Try $dirname = "c:\\temp"; I need to use dos-style backslashes on my Windows machine for all file system-related functions. I find this code helps quite a bit for looping through directories for whatever reason: $dir_name = '\\stuff\\folder'; $dir_handle = opendir($dir_name); while (($curr_file = readdir($dir_handle)) !== false) {
    if ($curr_file != '.' && $curr_file != '..') {
      if (is_dir($actual_dir.'\\'.$curr_file)) {
       // do stuff for a directory
        // for example, $subfolders[] = $curr_file;
      }
      else {
        // do stuff for a file
       // for example, $files[] = $curr_file;
      }
    }
} Today's alienated gem: "Send your favorite mom lots of love and affection, free of shipping charges!" -- Seen on a shopping site
              -=- Mike Flynn - Burlington, VT -=-
mike@mikeflynn.net http://www.mikeflynn.net/ * Give blood * Wouldn't the free market, in its true form, be anarchy?

« previous php.windows (#7369) next »