Hi, I am into a situation where I need to pass a variable URL retrieved from data base into the require_once() function.something like require_once($URL) I have not been able to find any solution to this Please help
Do you mena like that? 1.php <?php $myVariable = "some value"; require_once("./2.php"); ?> PHP: 2.php <?php echo $myVariable; ?> PHP: if you run 1.php you get "some value" echoed. Or do you want to include different files based on variable value?
what you did is just good example if you store "www.domain.com/file.php" in $url then you just do require_once($url);