Re: Fileinformation

From: Date: Thu, 31 Aug 2000 15:30:21 +0000
Subject: Re: Fileinformation
Groups: php.windows 
Request: Send a blank email to php-windows+get-2347@lists.php.net to get a copy of this message
Hi First of all you are using single \. You should use either \\ or /. I prefer / so my scripts can be used on both NT and Unix platforms. Second, readdir($handle) only returns the file name you have to add the full path before calling filesize() or you have to change working directory to d:/audio. - Frank >Hi, >i want to get the information about filesize, date of last changes ans so on of files in a >specific directory. >I tried this code: > ><? >$handle=opendir("d:\audio"); >echo $handle, "<br><br>"; > >while ($file = readdir($handle)) { > echo $file, " ", filesize($file), "<br>"; >} >closedir($handle); >?> > >but the only thing that works is to show the directory contents. >I'm getting Filesize 0 for the "updirectory symbols" . and .. ! >For Filesize i don't get anything. Has anyone else tried this under Windows NT? >Hoping for help, >Markus > > >

« previous php.windows (#2347) next »