|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2001-01-12 10:30 UTC] cynic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 00:00:01 2025 UTC |
im using php for shell scripting in redhat 6.2. compiled with './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-oci8=/usr/local/oracle' trying to get the filetype files returns null for all entries exsept . and .. . -- code snippet -- $dp = opendir($dir); if($dp){ while (($file = readdir($dp))!== false) { // Skip . and .. and check for type // tried with this on and both here and at the start clearstatcache(); print($file." - ".filetype($file)."\n"); if(($file != ".") && ($file != "..") && (filetype($file) == $type)){ $files[] = $file; } }//while return($files); }//if else{ debug("The directory [$dir] was not found or couldn't be opened"); write_log("The directory [$dir] was not found or couldn't be opened"); return(0); } -- end of snippet ---------------------------------