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 Quote Link to comment 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. Quote Link to comment 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? Quote Link to comment 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"); Quote Link to comment 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.