[PHP]load config file from diffrent dir[FIXED]

Skilled Illusionist
Joined
Jan 14, 2005
Messages
395
Reaction score
2
hello,
i want to open a file from diffrent diretory
i did try google : php previous dir - Google zoeken
but no succes i did try this :
PHP:
<?php include(".. /config/collors.php"); ?>
the file where i use that code is in admin/admin.php

can anyone help by posting code or link

thank you - passie
 
Last edited:
Re: [PHP]load config file from diffrent dir

if im right it should be /../ that makes you go one map back. Im not sure, so dont hate me if i'm wrong ;)
 
Re: [PHP]load config file from diffrent dir

If you add '..' it will go a directory back. If you do '.' it will stay in that dir. The following dir:

configs/languages/../configfiles/./lol/../..

will result into 'configs'

../configs

will go one directory back and than take the configs dir.
 
Back