帝国cms6.6文件 connect.php的函数说明

帝国教程 强烈建议 2024-03-04 08:39 85 0

  摘录如下:

  esub($string,$length,$dot='');截取字符串函数,第三个参数为超过长度以后,在后面添加的字符串

  make_password($pwd_length);取得随机数

  db_connect();数据库连接

  DoSetDbChar($dbchar);设置数据库编码

  db_close();关闭数据库

  esetcookie($var,$val,$life=0;$ecms=0);设置cookie

  getvar($var,$ecms=0);取得cookie

  printerror($error="",$gotourl="",$ecms=0;$noautourl=0;$novar=0;);打印错误信息

  egetip();取得ip地址

  DoingReturnUrl($url,$from='');返回地址

  RepPostVar($var);参数处理函数

  GetFiletype($filename);取得文件扩展名

  RepGetFiletype($filetype);

  GetFilename($filename);取得文件名

  sub($string,$start=0,$length,$mode=false,$dot='');字符串截取函数$mode默认即可,这个变量没看到在哪弄的。。

  no_make_password($pw_length);取得随机数,这个是取得数字的

  ToReturnRGB($reg);颜色转rgb,#ff0000-->rgb(32,23,32)

  page1($num,$line,$page_line,$start,$page,$search);前台分页

  to_time($datetime);时间转换函数

  date_time($time,$format="Y-m-d H:i:s");时间转日期函数

  format_datetime($newstime,$format);格式化日期

  to_date($date);时间转换

  ReadFiletext($filepath);取得文件内容,网络文件本地文件都可以

  DoTitleFont($titlefont,$title);格式化标题,增加一些粗体

  SubSmalltextVal($value,$len);截取简介

  SubSchallSmalltext($value,$len);全站搜索简介

本站资源均来自互联网或会员发布,如果不小心侵犯了您的权益请与我们联系。我们将立即删除!谢谢!