Re: [PHP-WIN] File Ext

2003-09-29 Thread H Marc Bower
- Original Message - From: "Svensson, B.A.T. (HKG)" <[EMAIL PROTECTED]> > > I can\ only assume that it does work ok with a linux-based > > webserver or it wouldn't be in there. In fact, if I put in is_file() > > instead of !is_dir, it returns nothing at all. > > That code wont work on a un

RE: [PHP-WIN] File Ext

2003-09-29 Thread Svensson, B.A.T. (HKG)
> I can\ only assume that it does work ok with a linux-based > webserver or it wouldn't be in there. In fact, if I put in is_file() > instead of !is_dir, it returns nothing at all. That code wont work on a unix based system since in many cases files does not have an exstensions at all, like exec

Re: [PHP-WIN] File Ext

2003-09-27 Thread H Marc Bower
This will work, with several caveats since the purpose is not known... read()) { if (!is_dir($filename)) { clearstatcache(); $extension = substr($filename,-4); $realext = strstr($extension, "."); if ($realext <> "") { echo $realext."\n"; } } } $dir->close(); ?>