note 34949 added to function.file-exists
| From: | webmaster at pandasurf dot com | Date: | Wed, 13 Aug 2003 02:56:26 +0000 |
| Subject: | note 34949 added to function.file-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-54051@lists.php.net to get a copy of this message | ||
I find a simple method that actually works is:
$path = getcwd() . "/forum/include/config.inc.php";
if (file_exists($path)){
return true;
}else{
return false;
}
This is used in a function of mine and /forum/ is actually replaced with a variable. Obviously if
not being used in a function place the fail / success code in the respective areas instead of the
return values.
Mike Quigley
----
Manual Page -- http://www.php.net/manual/en/function.file-exists.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34949
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34949&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34949&report=yes