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));
}
更多可下载附件查看:
点击下载 Discuz开发之function_core常用函数解析.rar(大小:25.41K)
历史资源提醒--必看
该页面资源/教程来自原魔趣吧历史资源转移,因发布历史久远,部分资源/教程可能已失效或无法在最新版程序中安装使用!DZ资源建议在Discuz3.4及以下版本使用,PHP版本建议5.6。资源仅提供做代码研究学习使用!
因改版,部分贴内链接将无法正常跳转,如链接失效或未正常跳转,请利用站内搜索功能搜索资源名称获取对应资源!