mirror of
https://github.com/helloxz/onenav.git
synced 2026-06-13 21:01:42 +08:00
修复部分网站图标不显示的问题
This commit is contained in:
parent
a53dcfcf42
commit
d3cede4dff
@ -76,6 +76,20 @@ function is_login(){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//将URL转换为base64编码
|
||||
function base64($url){
|
||||
$urls = parse_url($url);
|
||||
|
||||
//获取请求协议
|
||||
$scheme = empty( $urls['scheme'] ) ? 'http://' : $urls['scheme'].'://';
|
||||
//获取主机名
|
||||
$host = $urls['host'];
|
||||
//获取端口
|
||||
$port = empty( $urls['port'] ) ? '' : ':'.$urls['port'];
|
||||
|
||||
$new_url = $scheme.$host.$port;
|
||||
return base64_encode($new_url);
|
||||
}
|
||||
// 载入前台首页模板
|
||||
require('templates/'.TEMPLATE.'/index.php');
|
||||
?>
|
||||
@ -166,7 +166,7 @@
|
||||
<span class="label label-info" data-toggle="tooltip" data-placement="left" title="" data-original-title="Hello I am a Tooltip"></span>
|
||||
<div class="xe-comment">
|
||||
<a href="#" class="xe-user-name overflowClip_1">
|
||||
<img src="https://favicon.rss.ink/?url=<?php echo $link['url']; ?>" alt="HUAN" width="16" height="16" />
|
||||
<img src="https://favicon.rss.ink/v1/<?php echo base64($link['url']); ?>" alt="HUAN" width="16" height="16" />
|
||||
<strong><?php echo $link['title']; ?></strong>
|
||||
</a>
|
||||
<p class="overflowClip_2"><?php echo $link['description']; ?></p>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user