... i know what the include is for css. i just didnt have it open and its in my file. i dont know it off by heart. btw ill try that ./config.php thanks. and with my css.css file it is in the root directory, and is being included by includes/top.php which is being included by admin/index.php it works on my regular page but not on my admin EDIT: got config working for admin directory, but now wont work for regular page. whetever ill just go back with 2 versions of each file, one for admin in root/admin/includes and one for regular in root/includes
Well if you post a mistake, that's what I got to go by. Everybody makes mistakes so I just pointed it out. Best hint to help with "finding" the missing admin CSS file is to use Firefox's developer's toolbar, CSS>View CSS, check the url it looks for and correct it from there. Could be a simple typo.
Everything is working now, (thanks for the help guys thought i already had a / before css) but now my config is looking for common.php in the wrong place. On the index it looks in the home/phpbb3 directory and on the admin index it looks in admin/phpbb3/ directory. if i change the config so it says phpbb3 is in "../phpbb3/ then it works for admin, and homepage is screwy. I may have to have seperate config files.
Could set a path variable to append to the include filename. Set the default for the main part of the site and override the variable for the admin section. Though using an admin conf file works too.
hm, thanks for that idea, ill try it. how would i go about doing this? my top.php file is the same file being included in both root/index.php and root/admin/index.php so i cant simply set a variable in that file because the variable will also happen in my admin directory, which is wrong. If i put the variable before the top.php script, top.php just overwrites it. If i put it after, config doesnt know where to include from. is there any way to get the url name so that i can be like if ($url[10] = admin)//if the tenth character of the url and later is admin (im not sure of the code, dont quote me on this) { $incpath = "../includes"; } else { $incpath = "/includes"; } PHP:
is there anyway i could do this? i searched google, but no results to suit what im after, maybe i searched the wrong thing. i dont know, hope sum1 can help me
$script_path = $_SERVER['SCRIPT_FILENAME']; if(preg_match('/admin/i', $script_path )) { $incpath = "../includes"; } else { $incpath = "/includes"; } Code (markup): Should work.