- 博客(9)
- 收藏
- 关注
转载 preg_quote()
1 <?php 2 /* 3 preg_quote($str) 平时不常用 4 正则运算符转义 5 . \ + * ? ^ [ ] $ ( ) { } = ! < > | : - 6 */ 7 header('content-type: text/html;charset = utf-8'); 8 ...
2017-07-14 16:42:00
112
转载 preg_split()
1 <?php 2 /* 3 preg_split($pattern, $subject) 4 explode(...)是其子集 5 */ 6 header('content-type: text/html;charset = utf-8'); 7 8 $pattern = '/[0-9]/'; 9 $...
2017-07-14 16:36:00
107
转载 preg_grep()
1 <?php 2 /* 3 preg_grep($pattern, array $input) 4 阉割版preg_filter(...) 只匹配不替换 5 */ 6 7 header('content-type: text/html;charset = utf-8'); 8 9 $pattern = '/[0-9]/';...
2017-07-14 16:31:00
148
转载 preg_replace()与preg_filter()
1 <?php 2 /* 3 preg_replace($pattern, $replacement, $subject) 4 preg_filter($pattern, $replacement, $subject) 5 */ 6 header('content-type: text/html;charset = utf-8'); 7...
2017-07-14 16:21:00
136
转载 preg_match()与preg_match_all()
1 <?php 2 // 显示汉字 3 header('content-type: text/html;charset = utf-8'); 4 5 /* preg_match($pattern, $subject, [array &$matches]) 第三个参数可选,也是引用参数 6 preg_match_all($patter...
2017-07-14 15:57:00
132
转载 WAMPServer自定义网站根目录
自定义根目录:1、首先在E盘下新建一个 Demo 的文件夹(设置一个根目录)2、打开 httpd.conf (方法如图),搜索 Documentroot ,将默认根目录改为 E:\Demo (已设置的根目录) 3、其实到这一步已经成功了。不过想要从任务栏中的WAMPServer图标进入 www dirctory的话,它显示还是默认根目录,可我不知道怎么改 /(ㄒo...
2017-07-11 16:27:00
123
转载 WAMPServer多站点配置方法
WAMPServer多站点配置方法:1、在C:\wamp\www 新建文件夹test01,在里面新建index.php,内容为 "Hello Test01"。2、C:\wamp\bin\apache\apache2.4.9\conf\extra 编辑文件httpd-vhosts.conf 复制粘贴最后一段,保留关键字 DocumentRoot "C:/wamp/www/test0...
2017-07-11 16:05:00
135
转载 PHP include 和 require 语句
PHP include 和 require 语句通过 include 或 require 语句,可以将 PHP 文件的内容插入另一个 PHP 文件(在服务器执行它之前)。include 和 require 语句是相同的,除了错误处理方面:require 会生成致命错误(E_COMPILE_ERROR)并停止脚本include 只生成警告(E_WARNING),并且脚本...
2017-07-09 16:42:00
96
转载 php 时间问题
获得简单的日期date() 函数的格式参数是必需的,它们规定如何格式化日期或时间。下面列出了一些常用于日期的字符:d - 表示月里的某天(01-31)m - 表示月(01-12)Y - 表示年(四位数)1 - 表示周里的某天其他字符,比如 "/", "." 或 "-" 也可被插入字符中,以增加其他格式。下面的例子用三种不同方法格式今天的日期:...
2017-07-09 16:20:00
66
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人