Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php convert path from server url to link

function path2url($file, $Protocol='http://') {
    return $Protocol.$_SERVER['HTTP_HOST'].str_replace($_SERVER['DOCUMENT_ROOT'], '', $file);
}
 
PREVIOUS NEXT
Tagged: #php #convert #path #server #url #link
ADD COMMENT
Topic
Name
3+4 =