note 100890 deleted from function.file-exists by peehaa
| From: | peehaa@php.net | Date: | Tue, 13 Dec 2016 10:13:36 +0000 |
| Subject: | note 100890 deleted from function.file-exists by peehaa | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208573@lists.php.net to get a copy of this message | ||
Note Submitter: anthonyiacono at gmail dot com
----
Try this replacement if you are having issues with safe mode restrictions:
<?php
function file_exists_2($dir, $file)
{
$ret = exec("ls ".$dir." | grep ".$file);
return (!empty($ret));
}
?>
I was having an issue because Apache kept resetting permissions for my public_html directory,
causing issues with safe mode.