note 119781 deleted from function.file-exists by cmb
| From: | cmb@php.net | Date: | Sun, 29 Sep 2019 07:15:36 +0000 |
| Subject: | note 119781 deleted from function.file-exists by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-212383@lists.php.net to get a copy of this message | ||
Note Submitter: gwionps at gmail dot com
----
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!