note 21841 deleted from function.include by sniper

From: Date: Wed, 29 Jan 2003 04:11:02 +0000
Subject: note 21841 deleted from function.include by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-42985@lists.php.net to get a copy of this message
following mainframe@thewatercooler.com (29-Jul-1999), I used file_exists() to check the existence of a file before include(). Evil users could still sometimes see my file structures if the file was a directory, or other kinds of files that exist but are unreadable to PHP. Suggestion: use (is_file($file) or is_link($file)) to check suitability, and the edistence check then comes free.

« previous php.notes (#42985) next »