详情页

帝国cms下载地址转码加密base64

时间:2024年04月11日

编辑:佚名

实现最终的下载地址如下:
http://sy5.78moban.com/url.php?url=aHR0cDovL3BhbmFwcDMucGs4NTUuY29tL2x5eDkvd2VpeGluLmFwaw==
实现过程:
url.php文件
链接: https://pan.baidu.com/s/1cciC1ZxuzVgraUVD60JZoA 提取码: exau
url.php文件代码:
<?php
header("Content-type: text/html; charset=utf-8"); 
$url=$_GET["url"];
if($url==''){echo "无下载地址";}
$urll=base64_decode($url);
header("Location:".$urll);?>
把附件的url.php文件放到网站根目录,模板中调用:
<?php $anxz="\\\/url.php?url=".base64_encode($navinfor[anxz]); ?>
<a href="<?=$anxz?>" class="androidBtn btnAnd" title=""><i class="icon"></i>安卓下载</a>
可以配合这篇:[ri-post id=”937″ thumb=”none”]
实现有内容的字段显示,无内容的不显示。
案例图:
相关文章
猜你需要