|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-12-03 08:44 UTC] stas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 05:00:01 2025 UTC |
When I run the filetype()-function on a unix-socket, my php 4.0.3 drops a warning like: <b>Warning: Unknown file type (49152) in /home/path/test.php on line 7</b> A good example to reproduce this behaviour is a 'echo filetype("/dev/log");', where I would expect a result like "socket", but I get a "unknown" and the warning. I include a short script which dumps the contents of a directory and calls the filetype-function on every found entry. When I run the script on /dev I get two warnings. ------------- test.php ------------------- <pre> <? $d = "/dev"; // dir to show $h = opendir($d); while($e = readdir($h)) { echo filetype("$d/$e"); echo " "; echo htmlentities($e); echo "<br>\n"; } closedir($h); ?> </pre> ------------------------------------------ yours, juker