mb_strimwidth

按字符宽度获取mb_strimwidth ( string $str , int $start , int $width [, string $trimmarker [, string $encoding ]] )参数说明:$str //指定字符串$start //指定从何处开始截取$width //截取文字的宽度$trimmarker //超过$width数字后显示的字符串$encodin...

继续阅读 »

php html实体转义

1.addslashes — 使用反斜线引用(转义)字符串;返回字符串,该字符串为了数据库查询语句等的需要在某些字符前加上了反斜线。这些字符是单引号(')、双引号(")、反斜线(\)与 NUL(NULL 字符)。一个使用 addslashes() 的例子是当你要往数据库中输入数据时。例如,将名字O'reilly插入到数据库中,这就需要对其进行转义。大多数据库使用\作为转义符:O\'reill...

继续阅读 »

PHP realpath() 函数

定义和用法realpath() 函数返回绝对路径。该函数删除所有符号连接(比如 '/./', '/../' 以及多余的 '/'),返回绝对路径名。若失败,则返回 false。比如说文件不存在的话。语法readlink(linkpath) 参数 描述 linkpath 必需。规定要检查的连接路径。 例子<?php echo realpath("test...

继续阅读 »

wp_get_post_tags 获取文章标签

使用方法;<?php wp_get_post_tags( $post_id, $args ) ?>$post_id为$post->ID$args 为设定返回值,默认全部返回,该参数wp_get_object_terms最后一个参数的设定可以使用如下参数Argument OptionsThe following information has to do with the$a...

继续阅读 »

php 字符串分割函数的总结

原文地址http://www.php100.com/html/php/hanshu/2013/0905/4694.html在php中字符串分割函数有很多很多,下面我来给各位朋友来介绍各种php中字符串分割实例,有需要的朋友可进入参考参考。PHP函数split()的基本语法为array split ( string $pattern, string $string [, int $limit]...

继续阅读 »