Northern Flame Posted October 7, 2007 Share Posted October 7, 2007 hello, this is a simple question about using include, whenever I try to include a file located in a directory before the current directory, it wont let me unless i use the entire path, such as http://domain.com/file.php an example of what im talking about: I am at http://domain.com/directory/file.php and i want to include http://domain.com/include.php other than writing include('http://domain.com/include.php'); is there an easier way to include a file in the previous directory? Quote Link to comment https://forums.phpfreaks.com/topic/72160-simple-include-question/ Share on other sites More sharing options...
MasterACE14 Posted October 7, 2007 Share Posted October 7, 2007 I don't believe their is an easier way. Quote Link to comment https://forums.phpfreaks.com/topic/72160-simple-include-question/#findComment-363872 Share on other sites More sharing options...
ludjer Posted October 7, 2007 Share Posted October 7, 2007 you will include it like this <?php include "./../include.php"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/72160-simple-include-question/#findComment-363887 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.