Re: [PHP-WIN] fread() and windows directory permissions

2001-05-08 Thread Mike Flynn
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 (($

Re: [PHP-WIN] fread() and windows directory permissions

2001-05-08 Thread Alessio Bernesco Làvore
I think you could not use fopen to open just a directory, without specify a file. Instead try to use: $handle=opendir('mydir'); while ($file = readdir($handle)) { echo "$file\n"; } closedir($handle); Bye, Alessio ""Benjamin Listwon"" <[EMAIL PROTECTED]> ha scritto nel messaggio 9d8l8b$74

[PHP-WIN] fread() and windows directory permissions

2001-05-08 Thread Benjamin Listwon
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello all, I am trying to read a directory on a Win2K installation of PHP4 and Apache 1.3. The following is the code I have to read in a directory. $dirname = "c:/temp"; $dirhandle = fopen($dirname, "r"); $dircontents = fread($dirhandle, filesize($di