yipeiwu_com6年前
thinkphp文件夹下config 里面有个convention.php文件 里面有三个配置 'DEFAULT_MODULE' => 'Home', // 默认模块 'DEF...
yipeiwu_com6年前
字符串函数 strlen:获取字符串长度,字节长度 substr:字符串截取,获取字符串(按照字节进行截取) strchr:与substr相似,从指定位置截取一直到最后 strrchr(...
yipeiwu_com6年前
本文实例讲述了PHP正则匹配反斜杠'\'和美元'$'的方法。分享给大家供大家参考,具体如下: 1. test.php: <?php $content = '111111...
yipeiwu_com6年前
简单版: <?php header("Content-Type: text/html;charset=utf-8"); $str = '<div class="...
yipeiwu_com6年前
实例如下: <?php /** * @name thumb 缩略图函数 * @param sting $img_name 图片路径 * @param...
yipeiwu_com6年前
实例如下: function unescape($str) { $str = rawurldecode($str); preg_match_all("/(?:%u.{...
yipeiwu_com6年前
实例如下: //将内容进行UNICODE编码 function unicode_encode($name) { $name = iconv('UTF-8', 'UCS-2', $...
yipeiwu_com6年前
本文实例讲述了php实现连接access数据库并转txt写入的方法。分享给大家供大家参考,具体如下: 这里的代码实现PHP读取手机归属地 并导入txt文件的功能(文章末尾附手机归属地 数...
yipeiwu_com6年前
本文实例讲述了PHP中大括号'{}'用法。分享给大家供大家参考,具体如下: 在PHP中,大括号“{}”可以起到如下作用: 1、将多个独立语句合并为一个复合语句,例如 if ... els...
yipeiwu_com6年前
本文实例讲述了PHP输出XML格式数据的方法。分享给大家供大家参考,具体如下: 方法1: <?php header("Content-type: text/xml");...