register global questions

Suspended
Joined
30 Jan 2005
Posts
467
i've just been looking through my php.ini file and i just read the part that goes.

; You should do your best to write your scripts so that they do not require
; register_globals to be on; Using form variables as globals can easily lead
; to possible security problems, if the code is not very well thought of.
register_globals = Off

but doesn't register globals have to be on to include pages like /?id=page here.

is there a way to get links working like that with register globals on then?
 
cheers bs. erm im still a bit confused cause im an idiot at php :confused:

would you be able to leave a little example on how one would go about setting up a php page to include pages.

is it still a code like this?

<?php
if(file_exists("$id.html")){
include ("$id.html");
} elseif (file_exists("$id.php")){
include ("$id.php");
} elseif (file_exists("$id.txt")){
include ("$id.txt");
} elseif (file_exists("$id")){
include ("$id");
} else{
include ("file could not be include");
}
?>

layoutpage.php?id=content
 
Back
Top Bottom