详情页

PHPCMSX中常用函数方法一览

时间:2024年02月24日

编辑:佚名

依靠PHPCMSX成为建站大佬,本文堪称为必读圣典!PHPCMSX建站想要网站更加个性化,那么中很多地方需要对数据进行调用,或是自定义的一些格式处理,安全过滤等等,这里定有你趁手的家伙什
先来个工具函数/方法大集合,客官您只管挑趁手的用
function str_charset($in_charset, $out_charset, $str_or_arr) //转换字符串或者数组的编码  
function set_cookie($var, $value = '', $time = 0) //设置cookie  
function get_cookie($var) //取得cookie  
function menu($parentid, $code = '') //获取菜单  
function is_ie() //判断当前浏览器是否为IE  
function is_date($ymd, $sep='-') //检查日期的合法性  
function is_email($email) //验证Email  
function file_down($filepath, $filename = '') //下载函数  
function ip() //取得IP地址  
function str_cut($string, $length, $dot = '...') //截取字符串  
function cache_read($file, $path = '', $iscachevar = 0) //读取缓存  
function cache_write($file, $array, $path = '') //写缓存  
function cache_delete($file, $path = '') //删除缓存文件  
function string2array($data) //把字符串转化成数组  
function array2string($data, $isformdata = 1) //把数组转换成字符串  
function subarea($parentid = 0) //取得地区  
function subtype($module = 'phpcms') //取得模块的分类  
function thumb($imgurl, $width = 100, $height = 100 ,$autocut = 1) //生成缩略图  
function get_sql_catid($catid) //取得$catid的所有子栏目ID  
function get_sql_in($string, $s = ' ') //创建一个in 子句  
function pages($total, $page = 1, $perpage = 20, $urlrule = '', $array = array(), $catid = 0) //分页函数  
function showmessage($msg, $url_forward = 'goback', $ms = 1250, $direct = 0) //创建提示信息  
function load($file, $module = 'phpcms', $dir = '', $isinit = 1) //包含一个类文件(如同:include_once),同时返回一个对象  
function areaname($areaid) //返回$areaid 对应的地区名字  
function username($userid) //取得用户名  
function userid($username) //取得用户id
function str_charset($in_charset, $out_charset, $str_or_arr) //转换字符串或者数组的编码
function set_cookie($var, $value = '', $time = 0) //设置cookie
function get_cookie($var) //取得cookie
function menu($parentid, $code = '') //获取菜单
function is_ie() //判断当前浏览器是否为IE
function is_date($ymd, $sep='-') //检查日期的合法性
function is_email($email) //验证Email
function file_down($filepath, $filename = '') //下载函数
function ip() //取得IP地址
function str_cut($string, $length, $dot = '...') //截取字符串
function cache_read($file, $path = '', $iscachevar = 0) //读取缓存
function cache_write($file, $array, $path = '') //写缓存
function cache_delete($file, $path = '') //删除缓存文件
function string2array($data) //把字符串转化成数组
function array2string($data, $isformdata = 1) //把数组转换成字符串
function subarea($parentid = 0) //取得地区
function subtype($module = 'phpcms') //取得模块的分类
function thumb($imgurl, $width = 100, $height = 100 ,$autocut = 1) //生成缩略图
function get_sql_catid($catid) //取得$catid的所有子栏目ID
function get_sql_in($string, $s = ' ') //创建一个in 子句
function pages($total, $page = 1, $perpage = 20, $urlrule = '', $array = array(), $catid = 0) //分页函数
function showmessage($msg, $url_forward = 'goback', $ms = 1250, $direct = 0) //创建提示信息
function load($file, $module = 'phpcms', $dir = '', $isinit = 1) //包含一个类文件(如同:include_once),同时返回一个对象
function areaname($areaid) //返回$areaid 对应的地区名字
function username($userid) //取得用户名
function userid($username) //取得用户id
相关文章
猜你需要