$config[path] = $_SERVER[DOCUMENT_ROOT;].substr(dirname(__FILE__),strlen($_SERVER[DOCUMENT_R;])); //this gives releltive url without trailing / $config[url] = tp://'http://'.$_SERVER[SERVER_NAME].dirname($_SERVER[REQUEST_URI]); // this works perfectly.. The above examples work like this: They out put the url to the folder name: IE: www.xxxxx.com/folder/folder/folder/ or no"/".. I call this the path to parent folder of an unknown file position ur and path.. HOW DO I DO THIS WITH JAVASCRIPT? Im trying to output an url to this files location not the file itself... and im looking for a result like this: http://www.xxxxx.com/folder/folder/folder with or without the trailing /..... i can just add this to the include file links prefix... The big thing to know, i dont know the username folder.. Please help.. Regards Antony
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)