...
|
...
|
@@ -265,4 +265,31 @@ class Fun { |
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 博客链接
|
|
|
* @param $blog
|
|
|
* @return string
|
|
|
* @author:dc
|
|
|
* @time 2023/1/16 11:53
|
|
|
*/
|
|
|
public static function blog_url($blog){
|
|
|
if($blog){
|
|
|
try {
|
|
|
return '/blog/'.$blog['blog_id'].'?'.urlencode(
|
|
|
strtolower(
|
|
|
str_replace(" ",'-',
|
|
|
str_replace(['?'],'',$blog['blog_title'])
|
|
|
)
|
|
|
)
|
|
|
);
|
|
|
}catch (\Throwable $e){
|
|
|
return '';
|
|
|
}
|
|
|
}
|
|
|
return '';
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
...
|
...
|
|