note 108396 added to splfileobject.construct

From: Date: Mon, 23 Apr 2012 08:22:15 +0000
Subject: note 108396 added to splfileobject.construct
Groups: php.notes 
Request: Send a blank email to php-notes+get-187290@lists.php.net to get a copy of this message
I had a problem using SplFileObject on a windows system running win2k8r2 server and iis. Creating an SplFileObject from a directory results in a 500 internal server error and a "permission denied" in the error log. In my oppinion this is not a php error but a difference between directory handling on windows and unix systems. <pre>$file = new SplFileObject($filename); if($file->isDir() { echo "foo"; }</pre> will not work, but <pre>if(is_dir($filename)) { $file = new SplFileObject($filename); }</pre> will. ---- Server IP: 72.55.140.6 Probable Submitter: 212.18.197.129 ---- Manual Page -- http://www.php.net/manual/en/splfileobject.construct.php Edit -- https://master.php.net/note/edit/108396 Del: integrated -- https://master.php.net/note/delete/108396/integrated Del: useless -- https://master.php.net/note/delete/108396/useless Del: bad code -- https://master.php.net/note/delete/108396/bad+code Del: spam -- https://master.php.net/note/delete/108396/spam Del: non-english -- https://master.php.net/note/delete/108396/non-english Del: in docs -- https://master.php.net/note/delete/108396/in+docs Del: other reasons-- https://master.php.net/note/delete/108396 Reject -- https://master.php.net/note/reject/108396 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#187290) next »