⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 functions.php

📁 phpcms网站管理系统  很不错的 有需要的就下载看看八 
💻 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 + -