I want to convert directory paths to absolute URLs. For eg.
C:\example\myfile to http://example.com/myfile
How can I do this? Please help me.
I want to convert directory paths to absolute URLs. For eg.
C:\example\myfile to http://example.com/myfile
How can I do this? Please help me.
Use the $_SERVER['SERVER_NAME'] property to get the domain you are running on, then append it to the root of your file location.
i.e. If file is in C:\www\mydir\myfile.file, then
$url = $_SERVER['SERVER_NAME'].'/mydir/myfile.file';