예제 #1
0
파일: Url.php 프로젝트: tkaratug/titan-mvc
 function base_url($path = null)
 {
     if (is_null($path)) {
         if (BASE_DIR == '/') {
             return request_scheme() . http_host();
         } else {
             return request_scheme() . http_host() . BASE_DIR;
         }
     } else {
         if (BASE_DIR == '/') {
             return request_scheme() . http_host() . '/' . $path;
         } else {
             return request_scheme() . http_host() . BASE_DIR . '/' . $path;
         }
     }
 }
예제 #2
0
파일: Url.php 프로젝트: fatihgol/titan-mvc
/**
 * Getting base url of application
 * @return string
 */
function base_url()
{
    return request_scheme() . http_host() . BASE_DIR;
}