Cita de: SpiderNet en 21 Septiembre 2008, 01:01 AM
pero... creo que no debería irme codigo por codigo....
Hay un metodo rápido con pocas instrucciones para darle solución rápida?
Saludos!!!
Código (php) [Seleccionar]
<?php
// Unregister_globals: unsets all global variables set from a superglobal array
// --------------------
// This is useful if you don't know the configuration of PHP on the server the application
// will be run
// Place this in the first lines of all of your scripts
// Don't forget that the register_global of $_SESSION is done after session_start() so after
// each session_start() put a unregister_globals('_SESSION');
function unregister_globals()
{
if (!ini_get('register_globals'))
{
return false;
}
foreach (func_get_args() as $name)
{
foreach ($GLOBALS[$name] as $key=>$value)
{
if (isset($GLOBALS[$key]))
unset($GLOBALS[$key]);
}
}
}
unregister_globals('_POST', '_GET', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES');
?>
Ponlo en algún archivo que está incluido en todos los archivos.
Saludos