Discuz开发之function_core常用函数解析 [复制链接]

moqu8 2018-5-1

1827 0
Discuz function_core 常用函数解析,有需要的朋友可以参考下。
Discuz!常用函数解析

<?php  

/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: function_core.php 34523 2014-05-15 04:22:29Z nemohou $
*/

if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}

define('DISCUZ_CORE_FUNCTION', true);

/**
* like url encode, but can encode full url, not only the parms
* this function to encode URLs according to RFC 3986(exclude char ',(,) )
* @param type $url
* @return type
*/
function durlencode($url) {
static $fix = array('%21', '%2A','%3B', '%3A', '%40', '%26', '%3D', '%2B', '%24', '%2C', '%2F', '%3F', '%25', '%23', '%5B', '%5D');
static $replacements = array('!', '*', ';', ":", "@", "&", "=", "+", "$", ",", "/", "?", "%", "#", "[", "]");
return str_replace($fix, $replacements, urlencode($url));
}
更多可下载附件查看:
339555ae87279da5c7.png175925ae872802cf3f.png

点击下载 Discuz开发之function_core常用函数解析.rar(大小:25.41K)




最新回复 (0)
返回
支持中心
邮箱:winkill2012@qqcom
新站优化中!部分功能尚未完善,敬请谅解!
支持中心