note 36096 added to function.file-exists

From: Date: Thu, 25 Sep 2003 16:52:32 +0000
Subject: note 36096 added to function.file-exists
Groups: php.notes 
Request: Send a blank email to php-notes+get-57117@lists.php.net to get a copy of this message
Include language file: <? $lang = substr($HTTP_ACCEPT_LANGUAGE,0,2); if(file_exists( "$lang.inc.php")){ require("$lang.inc.php"); } else{ require('en.inc.php'); } ?> Enjoy! Bob http://www.car-hire-in.org/North_America/ ---- Manual Page -- http://www.php.net/manual/en/function.file-exists.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+36096 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+36096&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+36096&report=yes

« previous php.notes (#57117) next »