当前位置:首页 > 搜索和 r 相关的文章

php正则入门,实习email和URL验证

添加日期:2014-08-15 13:21:21 发布:smiling 
匹配email地址的正则表达式:w+([-+ ]w+)*@w+([- ]w+)* w+([- ]w+)*匹配网址url的正则表达式:[a-za-z]+: [^s]*下面看一实例,代码如下:<body onload="f a select();"><?phpecho& 39;a:& 39; html ...

php利用stream_socket_server与stream_socket_client

添加日期:2014-08-06 14:47:27 发布:smiling 
以上php为服务端,它将监听消息,直到按下:ctrl+cwhile(true){ 每5秒执行一次receive_message(& 39;127 0 0 1& 39;,& 39;85& 39;,5);} 自定义函数用于获取消息functionreceive_message($ips教 ...

php中数据转换成url的http_build_query函数

添加日期:2014-08-06 14:22:34 发布:smiling 
用法:http_build_query($formdata[,string $numeric_prefix[,string $arg_spearotor]])http_build_query函数是php5加入的,作用就是把数组或对象转换成url的querystring,代码如下:<?php* $data=ar ...

PHP的preg_match_all正则字符多次出现第一次出代码

添加日期:2014-08-06 14:15:09 发布:smiling 
$str[1]="i我是一只小小qq:42343243444234324";$str[2]="我是一只小小qq联系人42343244234fasdfdsfas";$str[3]="我是一只小小qq42343244234fasdfdsfas";$preg=" (d*)(d{5,14}) ";for($i=1;$i<4;$i ...

php array_unique 处理后json_encode注意事项

添加日期:2014-08-06 09:54:21 发布:smiling 
php array_unique 处理后json_encode注意事项array_unique() 先将值作为字符串排序,然后对每个值只保留第一个遇到的键名,接着忽略所有后面的键名,这并不意味着在未排序的 array 中同一个值的 ...

php正则指定字符串内容preg_match函数之说明

添加日期:2014-08-06 09:50:12 发布:smiling 
php正则指定字符串内容preg_match函数之说明,虽然代码不多,但简单明了,代码如下:preg_match(& 39; ^(?!string) & 39;, & 39;aa& 39;) === true这个用来验证一个字符串是否是非& 39;string& 39; ...

eAccelerator加速php程序

添加日期:2014-08-05 17:13:55 发布:smiling 
什么是eaccelerator概念:eaccelerator 是一个免费开源的php加速、优化、编译和动态缓存的项目,它可以通过缓存php代码编译后的结果来提高php脚本的性能,使得一向很复杂和离我们很远的php脚本编译问 ...

php ExcelReader读取excel文件

添加日期:2014-08-05 14:13:47 发布:smiling 
一、 概述php-excelreader 是一个读取 excel xsl 文件内容的一个php类,它的下载网址:http: sourceforge net projects phpexcelreader 测试用excel文件:测试 xls,文件名:phpexcelreader zip包 ...

php curl用法

添加日期:2014-08-05 14:11:00 发布:smiling 
在php使用curl时必须先在php ini中开启extension=php_curl dll前面的;去了才行,curl是php中一款内置的浏览器,它可以模仿用户浏览信息进行网站浏览,等下面来看一实例,代码如下:functionpostpage($ur ...

php ereg_replace函数

添加日期:2014-08-05 13:50:17 发布:smiling 
$string="thisisatest";echostr_replace("is","was",$string);echoereg_replace("()is","1was",$string); 其中1就是第一个括号中空格echoereg_replace("(()is)","2was",$string); 其中2就是第二 ...

php curl_setopt与模拟用户登录

添加日期:2014-08-05 13:23:12 发布:smiling 
bool curl_setopt (int ch, string option, mixed value)curl_setopt()函数将为一个curl会话设置选项,option参数是你想要的设置 value是这个选项给定的值,该例子为模拟登录,代码如下:$cooki ...

zend framework Invalid command RewriteEngine

添加日期:2014-08-04 15:38:41 发布:smiling 
zend framework invalid command & 39;rewriteengine& 39;解决办法zend framework tutorial时候,运行例子,浏览器报错为:the server encountered an internal error and was unable ...