function.mtblogrelativeurl.php

来自「1. 记录每个帖子的访问人情况」· PHP 代码 · 共 16 行

PHP
16
字号
<?phpfunction smarty_function_MTBlogRelativeURL($args, &$ctx) {    // status: complete    // parameters: none    $blog = $ctx->stash('blog');    $host = $blog['blog_site_url'];    if (!preg_match('!/$!', $host))        $host .= '/';    if (preg_match('!^https?://[^/]+(/.*)$!', $host, $matches))        return $matches[1];    else        return '';}?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?