I have files to include in the format “name_type.php”, and I’m loading the page as “url.php?name=example”.
I want to generate an include for specific files using ‘name’ to get the correct one. So far I’ve tried the following and nothing seems to work.
[php]$link = ‘/filepath/’ . $_GET[“name”] . ‘_type.php’;
include($link);[/php]
[php]include(’/filepath/’ . $_GET[“name”] . ‘_type.php’);[/php]
[php]$path = ‘/filepath/’;
$ext = ‘_type.php’;
$link = $path . $_GET[“name”] . $ext;
include($link);[/php]
I’ve also tried sticking them in eval(); functions but that returned NULL each time. Is there a certain way this needs to be done for it to work?