![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
24/05/2011, 01:22
|
|
Respuesta: Abrir sub_enlace Ya he arreglado lo del tema de la seguridad, ¿será mejor así?:
<?php
if(isset($_GET['page']))
{
$page = $_GET['page'];
$section = "include";
if(isset($_GET['section']))
{
$section = $_GET['section'];
if(!strpos($page,"/") && !strpos($section,"/") &&
!strpos($page,".") && !strpos($section,"."))
{
$path = $section."/".$page.".php";
if(file_exists($path))
{
include($path);
}
else
{
echo "La pagina solicitada no existe"; //no acceso
}
}
else
{
echo "No se permite ingresar a esta página"; //no acceso
}
}
}
?> |