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? 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. 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"; ?> Link to comment https://forums.phpfreaks.com/topic/72160-simple-include-question/#findComment-363887 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.