bmobm.co.uk Posted May 7, 2007 Share Posted May 7, 2007 This is my first post on here and I hope this is worthy of a first post, lol. Any way, I have a website bmobm.co.uk which is running 2 phpprobid scripts and a phpBB3 forum, My problem is....(and please bare with me here because i kinda know absolutly nowt bout php coding) i wish to include some files ie overall_heaper, overall_footer etc..... but they are all situated in a folder deeper into the directory than the index file im trying to write is situated. I did manage to connect to the file but i am getting an : Access Denied error. im guessing that somewhere in the auction software script there is a permission set to not allow linking to files unless its in a "certain directory" ie the root directory for the phpprobid script, My index which i am trying to write is situated in MY main document root which is one above the probid directory. Im desperatly trying to gat the function to work as i want the same theme throughout my site but as i ave said there is some code in there somewhere stopping me from linking directly to the overall_header and other files i wish to include. Any help would be greatly appreciated Many thanks in advance bmobm.co.uk Link to comment https://forums.phpfreaks.com/topic/50380-problem-include-file-from-another-directory/ Share on other sites More sharing options...
lewis987 Posted May 7, 2007 Share Posted May 7, 2007 so what im getting is this: u want the include function to acquire files from a certain directory? try this: <? //start PHP code include '/path/to/file/you/are/looking/for/file.jpg'; //link to file ?> //end PHP code Link to comment https://forums.phpfreaks.com/topic/50380-problem-include-file-from-another-directory/#findComment-247403 Share on other sites More sharing options...
bmobm.co.uk Posted May 7, 2007 Author Share Posted May 7, 2007 its not a image its a header.php file maybe this might help to understand what i mean (im not the best at explaining things lol) help the first part of the file im trying to include is this <? ## v5.24 -> apr. 05, 2006 if ( !defined('INCLUDED') ) { die("Access Denied"); } ### enter hit into stats table if ($setts['maintenance_mode']==1&&$_SESSION['adminarea']!="Active") { include_once ("maintenance_splash_page.php"); die(); Link to comment https://forums.phpfreaks.com/topic/50380-problem-include-file-from-another-directory/#findComment-247407 Share on other sites More sharing options...
neel_basu Posted May 7, 2007 Share Posted May 7, 2007 try something like include('../file.php'); ../ means the mother directory include('../another_dir/file.php') First go to the mother directory and then choose another directry from that dir. Link to comment https://forums.phpfreaks.com/topic/50380-problem-include-file-from-another-directory/#findComment-247459 Share on other sites More sharing options...
bmobm.co.uk Posted May 7, 2007 Author Share Posted May 7, 2007 does that go in the file im trying to create? sorry if i soud stupid but i am a total newbie at this all Link to comment https://forums.phpfreaks.com/topic/50380-problem-include-file-from-another-directory/#findComment-247487 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.