note 100890 modified in function.file-exists by danbrown

From: Date: Sat, 13 Nov 2010 15:06:30 +0000
Subject: note 100890 modified in function.file-exists by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-173995@lists.php.net to get a copy of this message
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. --was-- Try this replacement if you are having issues with safe mode restrictions: 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. http://php.net/manual/en/function.file-exists.php

« previous php.notes (#173995) next »