Login   Register  
PHP Classes

File: DashUtils.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Travis Tidwell  >  Dash Media Player  >  DashUtils.php  >  Download  
File: DashUtils.php
Role: Auxiliary script
Content type: text/plain
Description: Common utility routines
Class: Dash Media Player
Embed the Dash Media player in a Web page
Author: By
Last change:
Date: 6 years ago
Size: 620 bytes


Class file image Download
 * Returns the Base URL of this script.
 * @return - The base URL of the location of this script.
function dash_base_url() 
$url ''
$url .= (($_SERVER['HTTPS'] != '') ? "https://" "http://"); 
$url .= $_SERVER['HTTP_HOST']; 
$path = (($_SERVER['REQUEST_URI'] != '') ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']); 
$url .= pathinfo($pathPATHINFO_DIRNAME); 
$url rtrim($url'/');
$url rtrim($url'\\');
$url preg_replace("/\?".preg_quote($_SERVER['QUERY_STRING'])."/"""$url); //remove query string if found in url
return $url;