摘要: 出现原因,其中一个是返回参数的访问级别小于函数的访问级别,也就是说当定义一个返回参数的方法的时候,如果返回参数的访问级别低于方法的访问级别就会出现这样的错误,这个是可以理解的,如果返回的参数不能被访问,那么定义的返回的方法也是错误的.(当你在一个访问性比较强(例如公共)的字段/属性/方法里使用自定义类型,而这个类型访问性比较低(例如保护/私有)的时候就发生这个问题了)那么:返回类型和方法的形参表中... 阅读全文
posted @ 2010-11-02 11:21 海乐学习 阅读(20408) 评论(0) 推荐(1) 编辑
摘要: <?php $aera_p="上海,海南,北京,重庆,四川";$aa=explode(",",$aera_p); //explode() 函数把字符串分割为数组//$aa=split("[,]",$aera_p); //截取以","为准的字符串,slipt为用正则表达式判断$BRCount = substr_count($aera_p, ','); //计算","为多少个for($i=0;$... 阅读全文
posted @ 2010-10-20 10:22 海乐学习 阅读(274) 评论(0) 推荐(0) 编辑
摘要: C# 取本地计算机名和IP地址using System.Net;string strHostName = Dns.GetHostName(); //计算机名 Dns.GetHostName(); //计算机名Dns.GetHostByName(Dns.GetHostName());//IP地址 阅读全文
posted @ 2010-10-11 15:43 海乐学习 阅读(447) 评论(0) 推荐(0) 编辑
摘要: php 获取系统时间<?php echo date("Y-m-d h:i:s"); ?><?php date_default_timezone_set('Asia/Chongqing'); //系统时间差8小时问题$now = getdate(time()); $cur_wday=$now['wday'];$date = date("Y-m-d H:i:s $cweekday[$... 阅读全文
posted @ 2010-10-09 11:14 海乐学习 阅读(14108) 评论(1) 推荐(1) 编辑
摘要: WebService应用中如果收到的信息非常大时出错。1:Maximum message size quota for incoming messages (65536) has been exceeded.已超过传入消息(65536)的最大消息大小配额。若要增加配额,请使用相应绑定元素上的 MaxReceivedMessageSize 属性。说明: 执行当前 Web 请求期间,出现未处理的异常。... 阅读全文
posted @ 2010-09-28 14:38 海乐学习 阅读(8435) 评论(1) 推荐(3) 编辑
摘要: 网页 前进,后退N为正数时前进N页,N为负数是后退N页比如history.go(-1)后退一页,history.go(1)前进一页<script language=javascript>  history.go(N)</script><input type=button value="后退" onClick="history.back(-1)" ><a c... 阅读全文
posted @ 2010-09-20 13:14 海乐学习 阅读(357) 评论(0) 推荐(0) 编辑
摘要: PHP中的MYSQL常用函数1、mysql_connect()-建立数据库连接格式: resource mysql_connect([string hostname [:port] [:/path/to/socket] [, string username] [, string password]])例: $conn = @mysql_connect("localhost", "username"... 阅读全文
posted @ 2010-09-12 17:41 海乐学习 阅读(446) 评论(0) 推荐(0) 编辑
摘要: switch 语句:switch ($label){case "个人信息": continue; break;case "同事":continue; break;case "系统管理":continue;break;}foreach 语句:foreach ($attributevalue as $label => $url) {$xtpl->assign("GCL_LABEL", $l... 阅读全文
posted @ 2010-09-06 18:31 海乐学习 阅读(438) 评论(0) 推荐(0) 编辑
摘要: <?php  $FileID=date("Ymd-His") . '-' . rand(100,999);  //$FileID为 20100903-132121-908 这样的的随机数?><?phpfunction randomkeys($length){$pattern='1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLOMNO... 阅读全文
posted @ 2010-09-03 21:37 海乐学习 阅读(113840) 评论(3) 推荐(1) 编辑
摘要: $bean->StopTime=date("Y-m-d H:i:s");// 当前时间$one = strtotime($bean->StartTime);$tow = strtotime($bean->StopTime);$len = $tow - $one; //得出时间戳差值$bean->TimeLen=$len; //时间差 秒date_default_timezo... 阅读全文
posted @ 2010-09-03 21:24 海乐学习 阅读(1075) 评论(0) 推荐(0) 编辑