and it would include content/test/folder/test.php
The CODE:
<?php
$query = $_SERVER['QUERY_STRING'];
$queries = explode("?",$query);
$q[] = explode(":",$queries[0]);
$_GET = null;
foreach($q as $k => $v)
{
foreach($v as $a => $b)
{
if(!empty($v[$a+1]))
{
$_GET[$b] = $v[$a+1];
}
}
$new_arr = array();
foreach($_GET as $k => $v)
{
if(!in_array($k,$new_arr))
{
$new_arr[$k] = $v;
}
}
$_GET = null;
foreach($new_arr as $k => $v)
{
$_GET[$k] = $v;
}
}
// Security, I guess..
$file = "content/{$_GET['folder']}/{$_GET['file']}.php";
if(file_exists($file))
{
include($file);
}
else
{
include("news/show_news.php");
}
?>
But, I get this error:
Quote
Warning: Invalid argument supplied for foreach() in /home/dylan/public_html/core/index.php on line 423
Line 423:
foreach($_GET as $k => $v)
Also, when I try and goto a page such as, ?folder:adobeps:file:list it doesn't work.
What am I doing wrong here?
