note 119781 added to function.file-exists

From: Date: Tue, 23 Aug 2016 12:56:05 +0000
Subject: note 119781 added to function.file-exists
Groups: php.notes 
Request: Send a blank email to php-notes+get-206375@lists.php.net to get a copy of this message
I was using this function (and others related to files) naively. The following is possible: <?php $path = "../index.php"; if (file_exists("img/" . $path)) { echo file_get_contents("img/" . $path); } ?> I know it's naive, but it's worth noting! ---- Server IP: 72.52.91.14 Probable Submitter: 51.37.150.236 ---- Manual Page -- http://php.net/manual/en/function.file-exists.php Edit -- https://master.php.net/note/edit/119781 Del: integrated -- https://master.php.net/note/delete/119781/integrated Del: useless -- https://master.php.net/note/delete/119781/useless Del: bad code -- https://master.php.net/note/delete/119781/bad+code Del: spam -- https://master.php.net/note/delete/119781/spam Del: non-english -- https://master.php.net/note/delete/119781/non-english Del: in docs -- https://master.php.net/note/delete/119781/in+docs Del: other reasons-- https://master.php.net/note/delete/119781 Reject -- https://master.php.net/note/reject/119781 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#206375) next »