pcw Posted March 10, 2009 Share Posted March 10, 2009 Hi, I am trying to include a file into my script. The license.php is stored in sitebuilder/data/ and the header and footer file i need to include in license.php are located in sitebuilder/templates/admin/ How do I get the file to follow the right include path? I keep getting Warning: include(templates/admin/header.htm) [function.include]: failed to open stream: No such file or directory in /home/moveitho/public_html/sitebuilder/data/license.php on line 1 Warning: include(templates/admin/header.htm) [function.include]: failed to open stream: No such file or directory in /home/moveitho/public_html/sitebuilder/data/license.php on line 1 Warning: include() [function.include]: Failed opening 'templates/admin/header.htm' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mysite/public_html/sitebuilder/data/license.php on line 1 and cant figure out whats wrong Link to comment https://forums.phpfreaks.com/topic/148839-solved-stuck-with-directory-path/ Share on other sites More sharing options...
lonewolf217 Posted March 10, 2009 Share Posted March 10, 2009 how about include '../../data/license.php'; honestly not sure if this type of path navigation works in PHP or not Link to comment https://forums.phpfreaks.com/topic/148839-solved-stuck-with-directory-path/#findComment-781566 Share on other sites More sharing options...
pcw Posted March 10, 2009 Author Share Posted March 10, 2009 Thanks for your reply, it was ../templates/admin/header.htm that worked Link to comment https://forums.phpfreaks.com/topic/148839-solved-stuck-with-directory-path/#findComment-781571 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.