I checked this out at php.net and I found this snippet that does exactly what I need it to do, except it includes the name of the file (the php file that the script is in) with the path. So it would show.
path/to/my/site/geturl.php
When I only want it to show
path/to/my/site/
this is the code:
$me = $_SERVER['PHP_SELF'];
$Apathweb = explode("/", $me);
$myFileName = $spliter[0]"."zip;
$pathweb = implode("/", $Apathweb);
$myURL = "http://".$_SERVER['HTTP_HOST'].$pathweb."/".$myFileName;
$PAGE_BASE['www'] = $myURL;
strstr( PHP_OS, "WIN") ? $strPathSeparator = "\\" : $strPathSeparator = "/";
$pathfile = getcwd ();
$PAGE_BASE['physical'] = $pathfile.$strPathSeparator.$myFileName;
$www = $PAGE_BASE['www'];
$physical = $PAGE_BASE['physical'];
I'm using it for that automated download script that I posted about yesterday, hopefully with this i'll be able to give a full url for it.
Anyways I've tried alot of things and I'm not so sure how to change it without getting it to not work in the proccess...so any help would be much appreciated.