Script Problems
| From: | sam tompson | Date: | Mon, 17 Jan 2005 01:59:39 +0000 |
| Subject: | Script Problems | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-27270@lists.php.net to get a copy of this message | ||
Hi, i dont know if you will be able to help me but im using a PHP include on my site and i use this code
<?
//header stuff
$page = $_GET['id'];
if(eregi("[a-z0-9\-_\.]+", $id, $regs)) //make sure $page is alphanumeric
{
if(file_exists($id))
{
include($id); //or readfile if not expecting php code
}
else
include("cutenews/show_news.php");
}
else
include("cutenews/show_news.php");
//footer stuff
?>
But it dosent seem to work on PHP5 could you please fix the script for php5 or tell me how to do it, i would really appreciate it
Thank you