Yeodan Posted May 22, 2009 Share Posted May 22, 2009 will this work? require $location . "/link.php"; if not will it work if I do this: require "" . $location . "/link.php"; if not how can I make this work? Quote Link to comment https://forums.phpfreaks.com/topic/159252-solved-includerequire-question/ Share on other sites More sharing options...
anupamsaha Posted May 22, 2009 Share Posted May 22, 2009 will this work? require $location . "/link.php"; if not will it work if I do this: require "" . $location . "/link.php"; if not how can I make this work? Both will work provided the variable $location has some valid path in it. include/require will fail if it sees include "/link.php" . Both of them cannot refer to a relative path. Hope this will help. Quote Link to comment https://forums.phpfreaks.com/topic/159252-solved-includerequire-question/#findComment-839913 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.