Jump to content

variable=value


syco

Recommended Posts

You forgot a semicolon here:

$area = $_['GET'][b];[/b]

Otherwise, if you have a file named "anythinghere.inc" which is in the same folder as "index.php", then yeah, it would work.

Link to comment
Share on other sites

ya also for a dot: include($area.".inc");if you want to include 'anythinghere.inc' with index.php?area=anythinghereuse$area = $_GET['area'];include($area.'.inc');

Link to comment
Share on other sites

You should put anythinghere.inc (or whatever file) in a separate directory (e.g. a directory called areas) so someone doesn't include bottom.inc or topnav.inc

$area = basename($_GET['area']); // Make sure it's a valid fileinclude 'topnav.inc';if (file_exists('areas/'.$area.'.inc')) // Make sure the file existsinclude 'areas/'.$area.'.inc';include 'bottom.inc';

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...