mirror of
https://gitee.com/ulthon/ulthon_information.git
synced 2026-03-03 16:24:28 +08:00
兼容PHP8.1
This commit is contained in:
@@ -129,7 +129,7 @@ function save_url_file($url, $type)
|
||||
|
||||
$model_file->save_name = $save_name;
|
||||
$model_file->save();
|
||||
|
||||
unlink($temp_file);
|
||||
return $save_name;
|
||||
}
|
||||
|
||||
@@ -276,3 +276,28 @@ function app_url(string $url = '', array $vars = [], $suffix = true, $domain = f
|
||||
|
||||
return url($url, $vars, $suffix, $domain);
|
||||
}
|
||||
|
||||
|
||||
if (!function_exists('ua_htmlspecialchars')) {
|
||||
function ua_htmlspecialchars($string)
|
||||
{
|
||||
|
||||
if (is_null($string)) {
|
||||
$string = '';
|
||||
}
|
||||
|
||||
return htmlspecialchars($string);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('ua_htmlentities')) {
|
||||
function ua_htmlentities($string)
|
||||
{
|
||||
|
||||
if (is_null($string)) {
|
||||
$string = '';
|
||||
}
|
||||
|
||||
return htmlentities($string);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user