Httpath php

Hi,

$httppath = “http:www.mydomain.net/dir/”.$_SERVER[‘HTTP_HOST’].dirname($_SERVER[‘PHP_SELF’]);

I’m not getting the path right because when the file is uploaded the URL
ends up being "http:www.mydomain.net/dir/file.jpghttp:www.mydomain.net/dir/file.jpg

Any help with this little error appreciated.

what are you trying todo? $_SERVER[‘HTTP_HOST’] is the address eg mydomain.net and $_SERVER[‘PHP_SELF’] is the location of the file from the root. so if you just want the address of that file its

$httppath = $_SERVER[‘HTTP_HOST’].’/’.$_SERVER[‘PHP_SELF’]

THANKS, that’s fixed it.