改进Url生成类

This commit is contained in:
thinkphp
2015-12-13 21:37:08 +08:00
parent 9444419dd3
commit 3c9a76a85b
2 changed files with 3 additions and 3 deletions

View File

@@ -75,7 +75,7 @@ class Url
}
}
if (isset($anchor)) {
if (!empty($anchor)) {
$url .= '#' . $anchor;
}
if ($domain) {

View File

@@ -21,10 +21,10 @@ class Think
$this->template = new Template($config);
}
public function fetch($template, $data = [], $cacheId = '')
public function fetch($template, $data = [], $cache = [])
{
if (is_file($template)) {
$this->template->display($template, $data, $cacheId);
$this->template->display($template, $data, $cache);
} else {
$this->template->fetch($template, $data);
}