thewooleymammoth Posted June 2, 2008 Share Posted June 2, 2008 i have a question about include() can you include a file in the directory above it? for some reason i cant get it to work... idk why its just not working for me haha include('../index.php'); and also is there a way to include from other servers? thanks Link to comment https://forums.phpfreaks.com/topic/108303-include-question/ Share on other sites More sharing options...
peranha Posted June 2, 2008 Share Posted June 2, 2008 Yes you can include a file that is not in the same folder, as far as different servers, not sure. Link to comment https://forums.phpfreaks.com/topic/108303-include-question/#findComment-555254 Share on other sites More sharing options...
thewooleymammoth Posted June 3, 2008 Author Share Posted June 3, 2008 Yes you can include a file that is not in the same folder, as far as different servers, not sure. k thanks, was my example the right way to do it? Link to comment https://forums.phpfreaks.com/topic/108303-include-question/#findComment-556707 Share on other sites More sharing options...
Jabop Posted June 3, 2008 Share Posted June 3, 2008 define("SERVER_ROOT",$_SERVER['DOCUMENT_ROOT']."/"); include(SERVER_ROOT."folder/file.php"); Link to comment https://forums.phpfreaks.com/topic/108303-include-question/#findComment-556712 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.