note 39863 deleted from function.file-exists by nlopess

From: Date: Fri, 13 Feb 2004 16:59:57 +0000
Subject: note 39863 deleted from function.file-exists by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-65105@lists.php.net to get a copy of this message
Note Submitter: face_server@hotmail.com.com ---- little example for what it can be used for <?php if (!isset($_GET['menu'])) { include('pages/home.php'); } if (isset($_GET['menu'])) { $filename = "pages/$_GET[menu].php"; if (file_exists($filename)) { include("pages/$_GET[menu].php"); } else { include("pages/404.php"); } } ?>

« previous php.notes (#65105) next »