PHP加密解密

/**
* 将路径转换加密
* @param string $file_path 路径
* @return string 转换后的路径
*/
function path_encode($file_path){
return rawurlencode(base64_encode($file_path));
}

/**
* 将路径解密
* @param string $file_path 加密后的字符串
* @return string 解密后的路径
*/
function path_decode($file_path){
return base64_decode(rawurldecode($file_path));
}