ecshop获取url_domain

<?php

function url_domain()
{
$curr = strpos($_SERVER['PHP_SELF'], '/') !== false ?
preg_replace('/(.*)()(\/?)(.)*/i', '\1', dirname($_SERVER['PHP_SELF'])) :
dirname($_SERVER['PHP_SELF']); $root = str_replace('\\', '/', $curr); if (substr($root, -1) != '/')
{
$root .= '/';
} return $root;
}
echo(url_domain());exit();
?>
上一篇:[Java 基础] 并发队列ConcurrentLinkedQueue和阻塞队列LinkedBlockingQueue用法


下一篇:(OJ)Java常用类-统计数字次数