/**
* @desc 匹配话题
* array
'#PHP#' => string 'PHP' (length=3)
'#正则表达式#' => string '正则表达式' (length=15)
'#a#' => string 'a' (length=1)
* @desc 匹配 @用户名
* @param String $text
* @return Array array
* */
function matchMentions($text = '') {
$return = null;
* @desc 获得匹配到的 url,只匹配http,https开头的url
* @return Array urls
function matchUrls($text = '') {
$URL_VALID_PRECEEDING_CHARS = "(?:[^/\"':!=]|^|\\:)";
在项目中我们经常要用到$_GET方式来进行传参,为了保证数据的正确和完整性我们还要再传递一个key来加以验证.
产生token函数:
Pathauto 模块自动生成各种内容的路径别名(节点,分类,用户),而不需要用户手动指定路径的别名。这使您可以得到/分类别名/节点名称,而不是/node/11。别名是基于一个 "模式"系统管理员可以控制的。
FileField Paths 模块扩展了Drupals默认功能核心上传模块,FileField模块和其他多种文件上传加入能够使用目标路径和文件名中的节点标记模块。
User Read-Only 模块允许管理员禁止用户帐户/个人资料字段修改。管理员可以选择哪些字段将被禁止,或将被允许字段。
javascript获得页面的可视宽高和页面自身宽高,兼容浏览器. function GetPageSize() { var scrW, scrH; if(window.innerHeight && window.scrollMaxY) { // Mozilla scrW = window.innerWidth + window.scrollMaxX;
当iframe不在父窗口打开时,跳转到父窗口
var parent_url = 'http://www.pecloud.cn'; if(parent.document.URL== document.URL) { window.location.href = parent_url; } else { //... } if(window.top == window) { window.top.location = parent_url; } else { //... }
$(document).ready(function() {
jQuery.fn.center = function() {
this.css("position","absolute");
this.css("top", ( $(window).height() - this.height() ) / 2+$(window).scrollTop() + "px");
PHP中文参考手册 HTML 5 中文手册
JQuery中文手册 CSS 3.0参考手册
HTML参考手册 MySQL参考手册
Smarty中文手册 Apache中文手册
w3school 中文参考手册
Java API 中文参考手册
JavaScript 中文参考手册
Zend_Framework 中文参考手册