Пример #1
0
/**
 *
 * @note     Query String 은 제외하고 PHP 스크립트의 URL 만 리턴한다.
 * @return string
 *
 * @note 리턴 예제: http://work.org/backend/index.php
 */
function url_script()
{
    return url_domain() . $_SERVER["PHP_SELF"];
}
Пример #2
0
/**
 * 授权信息内容
 *
 * @return  str
 */
function license_info()
{
    if ($GLOBALS['_CFG']['licensed'] > 0) {
        /* 获取HOST */
        if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
            $host = $_SERVER['HTTP_X_FORWARDED_HOST'];
        } elseif (isset($_SERVER['HTTP_HOST'])) {
            $host = $_SERVER['HTTP_HOST'];
        }
        $url_domain = url_domain();
        $host = 'http://' . $host . $url_domain;
        $license = '<a href="http://www.ecshop.com/license.php?product=ecshop_b2c&url=' . urlencode($host) . '" target="_blank"
>&nbsp;&nbsp;Licensed</a>';
        return $license;
    } else {
        return '';
    }
}
Пример #3
0
 private function url($filename)
 {
     $url = url_script();
     $path = parse_url($url, PHP_URL_PATH);
     $path = str_replace('/index.php', '', $path);
     return url_domain() . $path . '/' . PATH_DATA_UPLOAD . '/' . $filename;
 }