首页 > CMS > 织梦DEDE > 正文

DEDECMS里面DEDE函数解析

2024-07-12 08:30:23
字体:
来源:转载
供稿:网友

下面来解说下dedecms织梦cms模板里面的函数说明

在文件include/inc_function.php里面

1 2 GetCurUrl() 获贴切前的脚本的URL 1 2 GetAlabNum($str) 把字符串里的全角数字转为半角数字(会把非数字种类字符剔除) 1 2 Text2html($txt) 文本转HTML 1 2 Html2Text($str) 获得HTML里的文本 1 2 function ClearHtml($str) 打扫HTML符号 1 2 cnw_left($str,$len) 中文截取把双字节字符也看作一个字符 1 2 cn_substr($str,$slen,$startdd=0) 中文截取2,单字节截取形式 1 2 GetMkTime($dtime) 把日期时间格式转换为linux时间截,对于不能分辨的日期时间格式,会归来time() 1 2 SubDay($ntime,$stime) 归来收缩一天的Linux时间截 1 2 AddDay($ntime,$aday) 归来添置一天的Linux时间截 1 2 GetDateTimeMk($mktime) 从指定的Linux时间截转换 0000-00-00 00:00:00 样式的日期时间 1 2 GetDateMk($mktime) 从指定的Linux时间截转换为 0000-00-00 样式的日期时间 1 2 GetIP() 获得客户部IP 1 2 GetPinyin($str,$ishead=0,$isclose=1) 获得一串中文字符的拼音 ishead=0 时,输出全拼音 ishead=1时,输出拼音首字母 1 2 ShowMsg($msg,$gourl,$onlymsg=0,$limittime=0) 揭示Dedecms提醒消息,其中当onlymsg=1时,不跳转,仅揭示alert提醒 1 2 dd2char($dd) 把相称法定的数字转为字母(相称a-zA-Z Ascii码的数字转换为字母,不相称则不变) 1 2 PutCookie($key,$value,$kptime,$pa="/") 按默认参数设置一个Cookie(dede的cookie是穿越加密的,定然用GetCookie获得值,以防止用户模仿登录) 1 2 DropCookie($key) 使Cookie失效 1 2 function GetCookie($key) 获得一个cookie值

  

1 2 function GetCkVdValue() 获得检讨码的session值 1 2 FtpMkdir($truepath,$mmode,$isMkdir=true) 用FTP创立一个目录 1 2 FtpChmod($truepath,$mmode) 用FTP改换一个目录的权限 1 2 OpenFtp() 敞开FTP连接 1 2 CloseFtp() 关闭FTP连接 1 2 TestStringSafe(&$uid) 用户ID和密码或其它字符串平安性测验,归来true或false 1 2 htmlEncode($string) 过滤HTML代码 1 2 function AjaxHead() 发送一个ajax头 1 2 sendmail($email$mailtitle$mailbody$headers) 邮件发送函数 1 2 highlight($string,sidchina.com $words$hrefs='') 加亮一段HTML里的某些词汇
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表