-
添加日期:2014-08-18 09:51:22 发布:smiling
在php入门教程中php mysql是少不了的,下面我们就要告诉各位关于php mysql数据删除,更新,插入保存数据代码下面来一一看实例 一、数据删除,代码如下:<?php 连接数据库$link_id=mysql_connect("loc ...
-
添加日期:2014-08-18 09:42:18 发布:smiling
在web开发中经常会碰到一些简单的视频播放功能,但现在的视频格式不同,并且可以动态增加,所以我们就必须把视频保存到数据,好了下面我们来看我写的段简单的php视频网页播放器代码吧,代码如下:<?PHPin ...
-
添加日期:2014-08-18 09:06:00 发布:smiling
functionthrow_error($message){$error_page=" err error php";$error_url=$error_page;$error_url ="?REDIRECT_ERROR_NOTES=$message";$error_url ="&REDIRECT_URL=" $GLOBALS["PHP_SELF"];$error ...
-
添加日期:2014-08-17 21:06:19 发布:smiling
字符串A:"1,3,4,5,6,7,8,9,10,11,12,14,15,17,20,22,123,457",例如我想知道这个字符串里面是否含有"2",这时候"12","20","22"等 一代码如下:if(in_array(& 39;2& 39;,explode(& 39;,& 39;,$str)) ...
-
添加日期:2014-08-17 20:47:51 发布:smiling
count php,代码如下:$aid=isset($_GET[& 39;aid& 39;])?$_GET[& 39;aid& 39;]:& 39;& 39;;$t=isset($_GET[& 39;t& 39;])?$_GET[& 39;t& 39;]:& 39;& 39;;if(intval($aid)){if($t==& 39;show& 39;){ ...
-
添加日期:2014-08-17 20:45:41 发布:smiling
phpcurl实例代码如下:session_write_close();$pageurl="http: www phpfensi com index html";curl_setopt($ch,curlopt_returntransfer,1);curl_setopt($ch,curlopt_url,$pageurl);$html=curl_ex ...
-
添加日期:2014-08-17 20:36:54 发布:smiling
用正则过滤html标签,代码如下:$html_body ="<a href=& 39; & 39;>www phpfensi com< a>";preg_replace(" (< ?)(w+)([^>]*>) e","& 39; 1& 39; strtoupper(& 39; 2& 39;) & 39; 3& 39;",$html_bod ...
-
添加日期:2014-08-17 20:19:28 发布:smiling
functiontest(){list($a,$b)=explode("",microtime());return(float)$a+(float)$b;} 代码如下:$a=test();echo$a;$time=sprintf("% 12f",(double)test()-$a); 方法二,代码如下:functionss_timing_ ...
-
添加日期:2014-08-17 18:19:16 发布:smiling
方法一模仿用户访问网页functionreadpr($link,$url){$fp=fsockopen($url,80,$errno,$errstr,30);if(!$fp){echo"$errstr($errno)";exit(1);}else{$out="get$linkhttp 1 0";$out ="host:$url";$out ...
-
添加日期:2014-08-17 18:18:09 发布:smiling
$v=array(& 39;vv& 39;,& 39;bb& 39;);$str="vv,cc,abcde,www phpfensi com,vv";$str=preg_replace(" $v[0] ","<ahref=" $v[1] "target=_blank>" $v[0] "< a>",$str,1);echo$str; bb,cc,abcde,www ...
-
添加日期:2014-08-17 18:16:42 发布:smiling
$sn=strtolower($_server[& 39;server_name& 39;]?$_server[& 39;server_name& 39;]:$_server[& 39;http_host& 39;]);$query=trim(@$_server[& 39;request_uri& 39;]);$sn=str_replace(& 39;http: ...
-
添加日期:2014-08-17 18:01:54 发布:smiling
方法一,使用urldecode解码<?php$url=& 39;aaa php?region=& 39; urldecode("四川省");?><ahref="<?phpecho$url;?>">aaa< a> 方法二base64_encode<?$test="四川省";$test1=base64_encode($test); ...
-
添加日期:2014-08-17 17:52:08 发布:smiling
date_default_timezone_set(& 39;prc& 39;); ***求取从某日起经过一定天数后的日期,*排除周六周日和节假日*@param$start开始日期*@param$of ...