📄 functions.php
字号:
<?php
function attach_del($downurls)
{
global $f;
if(!$downurls) return false;
$downurls = explode("\n",$downurls);
if(!is_array($downurls)) return false;
$downurls = array_map("trim",$downurls);
foreach($downurls as $downurl)
{
$downurl = explode("|",$downurl);
$filepath = $downurl[1];
if(!preg_match("/^(http|ftp):\/\//i",$filepath)) @$f->unlink($filepath);
}
return true;
}
function phpcms_base64($str,$type='encode',$token='/',$sp='_')
{
$encode = $type == "encode" ? 1 : 0;
$str=trim($str);
if($encode)
{
$str=base64_encode($str);
$str2=str_replace($token,$sp,$str);
}
else
{
$str=str_replace($sp,$token,$str);
$str2=base64_decode($str);
}
return $str2;
}
function addhttp ($url)
{
$url = trim($url);
$haved = preg_match("/^http:\/\//",$url);
if($haved == 0){
return '';
}else{
return $url;
}
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -