Thayer
11-27-2010, 03:42 PM
Hello :)
I wonder how can i use the link like this:
index.php?site=home f.eks
I have no idea how i can do that.
I have tried this code but it only shows 1 file even if i change the url
<?php
if(!isset($site)) $site="news";
$invalide = array('\\','/','//',':','.');
$site = str_replace($invalide,' ',$site);
if(!file_exists($site.".php")) $site = "news";
include($site.".php");
?>
I wonder how can i use the link like this:
index.php?site=home f.eks
I have no idea how i can do that.
I have tried this code but it only shows 1 file even if i change the url
<?php
if(!isset($site)) $site="news";
$invalide = array('\\','/','//',':','.');
$site = str_replace($invalide,' ',$site);
if(!file_exists($site.".php")) $site = "news";
include($site.".php");
?>