Re: file_exists, is_readable & effective UID/GID
| From: | Jim Lucas | Date: | Wed, 24 Oct 2007 21:41:07 +0000 |
| Subject: | Re: file_exists, is_readable & effective UID/GID | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-263618@lists.php.net to get a copy of this message | ||
Daniel Brown wrote:
On 10/24/07, Manuel Vacelet <manuel.vacelet@gmail.com> wrote:what about doing it like this? <?php $filename = __FILE__; $stat_info = @stat($filename); if ( $stat_info ) { // do something... } The '@' will suppress the E_WARNING notice if stat fails the condition will fail. -- Jim Lucas "Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them." Twelfth Night, Act II, Scene V by William ShakespeareHi all, file_exists and is_readable perfom there test with real UID/GID. Is there any functions that tests file existance with effective UID/GID ? Note: stat is not an option because it raises an E_WARNING if the file is not readable. Thanks, Manuel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpThat's what you have things like <? ini_set("display_errors", "off"); ?>