标签:
教您如何在dede添加二维
找到这个文件 /include/extend.func.php
if ( ! function_exists(‘qr_code‘))
{
function qr_code($aid,$widhtHeight =‘150‘,$EC_level=‘L‘,$margin=‘0‘)
{
$arr = GetOneArchive($aid);
if($arr[‘arcurl‘]){
$str = urlencode($arr[‘arcurl‘]);
}else{
$str = urlencode($GLOBALS[‘cfg_phpurl‘].‘/view.php?aid=‘.$aid);
}
return ‘<img src="http://chart.apis.google.com/chart?chs=‘.$widhtHeight.‘x‘.$widhtHeight.‘&cht=qr&chld=‘.$EC_level.‘|‘.$margin.‘&chl=‘.$str.‘" alt="QR code" widhtHeight="‘.$widhtHeight.‘" widhtHeight="‘.$widhtHeight.‘"/>‘;
}
}
在文章页模板?调用,{dede:field.id function="qr_code(@me,200);"/}
标签:
原文地址:http://www.cnblogs.com/www-xiaobo-com/p/4442668.html