当前位置:首页 » 网页前端 » webutil
扩展阅读
webinf下怎么引入js 2023-08-31 21:54:13
堡垒机怎么打开web 2023-08-31 21:54:11

webutil

发布时间: 2022-06-23 04:19:06

A. java.lang.IllegalArgumentException: Cannot format given Object as a Number

传值是对象 不是数字 将传送到参数转化一下就好了

B. jquery跨域发送Post请求该怎么处理

$.ajax({
url:'http://'+licenseServer+'/licenseManager/license/RegistInfo-addRegist?callback=?',
type:'get',
dataType:'jsonp',
data:{
param:paramObj
},
success:function(msg){
if(msg.success){
alert("授权申请已提交成功,请等待管理员审核!");
}
},
error:function(msg){
alert("授权申请提交失败,请联系技术服务!");
}
});

上面是前台页面发出的请求

public void addRegist(){
try {
String callback = this.getRequest().getParameter("callback");
TRegistInfo regist = WebUtil.requestParam2Bean(getRequest(), TRegistInfo.class);
logger.info("callback="+callback);
logger.info(new GsonBuilder().setDateFormat("yyyy-MM-dd").create().toJson(regist));
regist.setScompanyname(new String(regist.getScompanyname().getBytes("ISO-8859-1"),"UTF-8"));
regist.setSlinkman(new String(regist.getSlinkman().getBytes("ISO-8859-1"),"UTF-8"));
regist.setSregistaddress(new String(regist.getSregistaddress().getBytes("ISO-8859-1"),"UTF-8"));
regist.setSremark(new String(regist.getSremark().getBytes("ISO-8859-1"),"UTF-8"));
regist.setDaddtime(new Date());
if(registInfoBiz.save(regist)){
this.writeResponse(callback+"({success:true})");
}else{
this.writeResponse(callback+"({success:false})");
}
} catch (Exception e) {
logger.error(e.toString());
}
}

这后台的代码包含了业务,希望你能看的懂,关键还在于callback

C. int result = DbHelper.ExecuteNonQuery( );C#

sqlParameter是SqlCommand 的参数对象,用于从数据源中选择对应的数据并将数据放在 DataSet 中

D. Oracle DevSuite 10 中如何将webutil.pll编译成webutil.plx

在 操作系统环境下
frmcmp_batch MODULE_TYPE=LIBRARY mole=WEBUTIL.pll userid=apps/apps

E. 用iReport导出的txt文件中中文部分成了乱码,这是什么原因,如何解决

安装就不用说了,但是要理解Ireport和JasperReport的关系十分重要,Ireport是设计报表的图形界面,在Ireport里新建一个报表是以.jrxml的形式保存的,而最终要用到的是将.jrxml的文件编译为.jsper的文件。.jasper文件就是JaserReport需要调用的报表模版,JasperReport的强大功能就在于它能将.jasper转化为各种文件的格式,如xls,rtf,pdf等等最常用的文件格式。
要将.jsper文件应用在项目中,首先要做几样准备工作:
1.将安装好的Ireport,找到它下面的lib目录,再把jasperreports-1.3.0.jar这个包复制出来(这个包是JasperReport导出的关键),然后将这个包导入到需要应用的项目中,然后在eclipse中重新构建整个项目,这是最关键的第一步。
2.如果导出出现乱码的问题,需要引入iText亚洲语言包,可以在 http://www.lowagie.com/iText/ 查看关于iText的相关信息,包括源代码,文档.
3.设计好报表,将报表编译为.jsper文件,这些文件在iReport的安装路径下,很容易找到。
现在万事俱备,只欠东风了。我在开始写程序的的时候,在网上找了好些代码,而导出的过程中用到的类 JRRtfExporter 的源代码也踩过,并且发现了 http://www.koders.com 这个非常好的网站,这是开源项目的必备,在上面基本上很多类的源码也能查到。
接着自己封装了一个JasperReport类,而这个类可以实现导出各种格式的文件,代码如下:
packagecommon.ireport;
importnet.sf.jasperreports.engine.*;
importnet.sf.jasperreports.engine.export.*;
importnet.sf.jasperreports.engine.export.JRRtfExporter;
importjava.util.List;
importjava.io.*;
import com.log.Logger;
/**
*IReport+JasperReport导出报表类接口
*<p>Title:导出报表类</p>
*<p>Description:</p>
*<p>Copyright:Copyright(c)2007</p>
*<font class=companyfont>
*CES
*</font>
*@author 野谷子
*@version 1.0.2007.02.14
*/
publicclassJasperReport{
privateLogger logger= newLogger("common.ireport.JasperReport");
/**CreatesanewinstanceofMyReport*/
publicJasperReport(){
}
/*
* 导出单个报表为rtf或word
* @param JasperPrint,OutputStream
* @ 页面设置response.setContentType("application/msword");
* @ 页面设置response.setHeader("Content-disposition","attachment;filename=fileName.doc");
* @ 页面设置response.setContentLength(bytes.length);
*/
publicvoidexportReportToRTF(JasperPrint jasperPrint,OutputStreamout){
JRRtfExporter rtfExporter= newJRRtfExporter();
rtfExporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
rtfExporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out);
try{
rtfExporter.exportReport();
logger.debug("Genertate the RTF report ok! :"+ out);
} catch(JRException e) {
e.printStackTrace();
logger.error("Generate the RTF report file ERROR!");
}
}
/*
* 导出多个报表为rtf或word
* @param List,OutputStream
* @ 页面设置response.setContentType("application/msword");
* @ 页面设置response.setHeader("Content-disposition","attachment;filename=fileName.doc");
* @ 页面设置response.setContentLength(bytes.length);
*/
(List jasperPrints,OutputStream out){
JRRtfExporter rtfExporter= newJRRtfExporter();
rtfExporter.setParameter(JRExporterParameter.JASPER_PRINT_LIST, jasperPrints);
rtfExporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out);
try{
rtfExporter.exportReport();
logger.debug("Genertate the mutiply RTF report ok! :"+ out);
} catch(JRException e) {
e.printStackTrace();
logger.error("Generate the mutiply RTF report file ERROR!");
}
}
/*
* 导出单个报表为PDF
* @param JasperPrint,OutputStream
* @ 页面设置response.setContentType("application/pdf");
* @ 页面设置response.setHeader("Content-disposition","attachment;filename=fileName.pdf");
* @ 页面设置response.setContentLength(bytes.length);
*/
publicvoidexportReportToPDF(JasperPrint jasperPrint,OutputStreamout){
JRPdfExporter pdfExporter = newJRPdfExporter();
pdfExporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
pdfExporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out);
try{
pdfExporter.exportReport();
logger.debug("Genertate the PDF report ok! :"+ out);
} catch(JRException e) {
e.printStackTrace();
logger.error("Generate the PDF report file ERROR!");
}
}
/*
* 导出单个报表为XLS
* @param JasperPrint,OutputStream
* @ 页面设置response.setContentType("application/vnd.ms-excel");
* @ 页面设置response.setHeader("Content-disposition","attachment;filename=fileName.xls");
* @ 页面设置response.setContentLength(bytes.length);
*/
publicvoidexportReportToXLS(JasperPrint jasperPrint,OutputStreamout){
JRXlsExporter xlsExporter= newJRXlsExporter();
xlsExporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
xlsExporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out);
xlsExporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);
try{
xlsExporter.exportReport();
logger.debug("Genertate the XLS report ok! :"+ out);
} catch(JRException e) {
e.printStackTrace();
logger.error("Generate the XLS report file ERROR!");
}
}
/*
* 导出单个报表为HTML
* @param JasperPrint,OutputStream
* @ 页面设置response.setContentType("text/html");
* @ 页面设置response.setHeader("Content-disposition","attachment;filename=fileName.html");
* @ 页面设置response.setContentLength(bytes.length);
*/
publicvoidexportReportToHTML(JasperPrint jasperPrint,OutputStreamout){
JRHtmlExporter htmlExporter = newJRHtmlExporter();
htmlExporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
htmlExporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out);
htmlExporter.setParameter(JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN, Boolean.FALSE);
htmlExporter.setParameter(JRHtmlExporterParameter.IS_OUTPUT_IMAGES_TO_DIR, Boolean.FALSE);
try{
htmlExporter.exportReport();
logger.debug("Genertate the HTML report ok! :"+ out);
} catch(JRException e) {
e.printStackTrace();
logger.error("Generate the HTML report file ERROR!");
}
}
/*
* 导出单个报表为CSV
* @param JasperPrint,OutputStream
*/
publicvoidexportReportToCSV(JasperPrint jasperPrint,OutputStreamout){
JRCsvExporter csvExporter = newJRCsvExporter();
csvExporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
csvExporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out);
try{
csvExporter.exportReport();
logger.debug("Genertate the CSV report ok! :"+ out);
} catch(JRException e) {
e.printStackTrace();
logger.error("Generate the CSV report file ERROR!");
}
}
/*
* 导出单个报表为TXT
* @param JasperPrint,OutputStream
* @ 页面设置response.setContentType("text/html");
* @ 页面设置response.setHeader("Content-disposition","attachment;filename=fileName.txt");
* @ 页面设置response.setContentLength(bytes.length);
*/
publicvoidexportReportToTXT(JasperPrint jasperPrint,OutputStreamout){
JRTextExporter txtExporter = newJRTextExporter();
txtExporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
txtExporter.setParameter(JRExporterParameter.OUTPUT_STREAM, out);
txtExporter.setParameter(JRTextExporterParameter.CHARACTER_WIDTH, newInteger(80));
txtExporter.setParameter(JRTextExporterParameter.CHARACTER_HEIGHT, newInteger(25));
try{
txtExporter.exportReport();
logger.debug("Genertate the TXT report ok! :"+ out);
} catch(JRException e) {
e.printStackTrace();
logger.error("Generate the TXT report file ERROR!");
}
}
/*
* 导出单个报表为XML
* @param JasperPrint,OutputStream
*/
publicvoidexportReportToXML(JasperPrint jasperPrint,OutputStreamout){
try{
JasperExportManager.exportReportToXmlStream(jasperPrint, out);
logger.debug("Genertate the XML report ok! :"+ out);
} catch(JRException e) {
e.printStackTrace();
logger.error("Generate the XML report file ERROR!");
}
}
}
然后写了一个Control类用于封装.jasper文件,并获取其对象,代码如下:
packagecommon.ireport;
importnet.sf.jasperreports.engine.*;
importnet.sf.jasperreports.engine.export.*;
importnet.sf.jasperreports.engine.export.JRRtfExporter;
importnet.sf.jasperreports.engine.util.*;
importnet.sf.jasperreports.view.*;
importjava.util.*;
importjava.util.List;
importjava.sql.*;
importjava.io.*;
import java.net.URL;
/**
*导出报表控制类*<p>Title:导出报表控制类</p>
*<p>Description:</p>
*<p>Copyright:Copyright(c)2007</p>
*<font class=companyfont>
*CES
*</font>
*@author 野谷子
*@version 1.0.2007.02.14
*/
publicclassJsperReportControl {
privateLogger logger= newLogger("common.ireport.JsperReportControl");
privateQuery query= newQuery();
//定义报表模版路径
privateString PREFIX="/ireportFile/";
//定义后缀名
privateString SUFFIX=".jasper";
publicJsperReportControl(){
}
/*
* 取得报表模版的对象
* 单个参数的情况
* @param 报表名称:strFileName
* @param 参数名称:strParamName
* @param 参数值:strParamValue
* @return JasperPrint
*/
publicJasperPrint getJsperPrint(String strFileName,String strParamName,String strParamValue) throwsSQLException{
JasperPrint jasperPrint = null;
String strJasper= this.getClassPath() + PREFIX + strFileName + SUFFIX ;
Map params = newHashMap();
params.put(strParamName,strParamValue);
//定义数据源连接对象
Connection conn = null;
query.createConnection(CommonManage.CONN);
conn = query.getConnection();
try{
//用JasperFillManager类导入.jasper文件,参数和数据源
jasperPrint = JasperFillManager.fillReport(strJasper, params, conn);
try{
if(conn==null){
conn.close();
}
}catch(SQLException sqle){
logger.error("关闭数据库连接错误"+sqle);
}
}catch(Exception e){
logger.error("getJsperPrint(String strFileName,String strParamName,String strParamValue) Error"+e);
}
returnjasperPrint;
}
/**
*在类中取得当前文件所在的相对路径与绝对路径
*
*@return String
*/
publicStringgetClassPath(){
StringstrClassName=getClass().getName();
StringstrPackageName="";
StringstrURL= "";
if(getClass().getPackage()!=null)
{
strPackageName=getClass().getPackage().getName();
}
//System.out.println("ClassName:"+strClassName);
//System.out.println("PackageName:"+strPackageName);
StringstrClassFileName="";
if(!"".equals(strPackageName))
{
strClassFileName=strClassName.substring(strPackageName.length()+1,strClassName.length());
}
else
{
strClassFileName=strClassName;
}
//System.out.println("ClassFileName:"+strClassFileName);
String strTempName = strClassFileName+".class";
try
{
URLurl=null;
url=getClass().getResource(strClassFileName+".class");
strURL=url.toString();
System.out.println(strURL);
logger.info("strURL="+strURL);
}
catch(Exceptionex)
{
ex.printStackTrace();
}
//取.jasper文件的绝对路径
strURL= strURL.substring("file:".length(),strURL.length()-strTempName.length());
System.out.println("strURL="+strURL);
returnstrURL;
}
}
期间在取绝对路径时出现了问题,在本机测试可以通过,但放在服务器上报错,原因是本机是windows系统,而服务器是linux系统,到现在我觉得最大的原因是getClass().getResource()这个方法在linux系统上取不到资源的位置而报错。
最后就是所写的 jsp 页面了 , 代码如下:
<%@ page import="java.util.Vector"%>
<%@ page import="java.io.*" %>
<%@ page import="java.io.OutputStream" %>
<%@ page import="java.util.List"%>
<%@ page import="net.sf.jasperreports.engine.*" %>
<%@ page import="common.ireport.JsperReportControl"%>
<%@ page import="common.ireport.JasperReport"%>
<%
String strMode = WebUtil.getParam(request,"mode").equals("")?"":WebUtil.getParam(request,"mode");
JsperReportControl jsperReportControl = newJsperReportControl();
JasperReport jasperReport = newJasperReport();
strFileName1 ="quanlitySupervise_page1";
strFileName2 ="quanlitySupervise_page2";
strFileName3 ="quanlitySupervise_page3";
strFileName4 ="quanlitySupervise_page4";
strFileName5 ="quanlitySupervise_page5";
strFileName6 ="quanlitySupervise_page6";
strFileName7 ="quanlitySupervise_page7";
strFileName8 ="quanlitySupervise_page8";
String strParamName="ID";
String strParamValue=strProjectID;
ByteArrayOutputStream baos = newByteArrayOutputStream();
String strQueryConditionTmp="projectName="+strProjectName;
QueryCtrl queryCtrl = newQueryCtrl();
String str="";
if(strMode.equals("out")){
JasperPrint jasperPrint1= jsperReportControl.getJsperPrint(strFileName1,strParamName,strParamValue);
JasperPrint jasperPrint2= jsperReportControl.getJsperPrint(strFileName2,strParamName,strParamValue);
JasperPrint jasperPrint3= jsperReportControl.getJsperPrint(strFileName3,strParamName,strParamValue);
JasperPrint jasperPrint4= jsperReportControl.getJsperPrint(strFileName4,strParamName,strParamValue);
JasperPrint jasperPrint5= jsperReportControl.getJsperPrint(strFileName5,strParamName,strParamValue);
JasperPrint jasperPrint6= jsperReportControl.getJsperPrint(strFileName6,strParamName,strParamValue);
JasperPrint jasperPrint7= jsperReportControl.getJsperPrint(strFileName7,strParamName,strParamValue);
JasperPrint jasperPrint8= jsperReportControl.getJsperPrint(strFileName8,strParamName,strParamValue);
List reportlist = (List)newjava.util.ArrayList();
reportlist.add(jasperPrint1);
reportlist.add(jasperPrint2);
reportlist.add(jasperPrint3);
reportlist.add(jasperPrint4);
reportlist.add(jasperPrint5);
reportlist.add(jasperPrint6);
reportlist.add(jasperPrint7);
reportlist.add(jasperPrint8);
//导出单页测试用
//jasperReport.exportReportToRTF(jasperPrint1,baos);
//整合多页导出
jasperReport.exportReportListToRTF(reportlist,baos);
byte[] bytes;
bytes = baos.toByteArray();
response.setContentType("application/ms_word");
String strDocName ="attachment;filename="+strProjectID+".doc";
response.setHeader("Content-disposition",strDocName);
response.setContentLength(bytes.length);
ServletOutputStream ouputStream = response.getOutputStream();
ouputStream.write(bytes, 0, bytes.length);
ouputStream.flush();
ouputStream.close();
}
}
%>
结尾:在本机测试通过了,但放于服务器出现了错误: Can't connect to X11 window server using':0.0' as the value of the DISPLAY
而在 windows 系统中却能正确运行,原因是程序调用了图形界面的功能,而 windows 很好的支持图形界面, linux 却不能很好的支持,需要修改 linux 中的 DISPLAY 的变量:
下面有几种方法:
1. 对于 tomcat 服务器:找到脚本: catalina.sh ,
在 /usr/local/tomcat/bin/catalina.sh 中修改为
JAVA_OPTS="-Djava.awt.headless=true" 或者 CATALINA_OPTS="-Djava.awt.headless=true"
echo "Using CATALINA_BASE:$CATALINA_BASE"
echo "Using CATALINA_HOME:$CATALINA_HOME"
echo "Using CATALINA_TMPDIR:$CATALINA_TMPDIR"
echo "Using RUNJAVA:$_RUNJAVA"
echo "Using JAVA_OPTS:$JAVA_OPTS"
2 .对于服务器中 oracle 自带的 JSP server ,找到 jserv.properties 这个配置文件,在上面添加:
wrapper.env=DISPLAY=<SERVERNAME>:0
3 .或者用root身份执行一下xhost +命令,
第一种情况:DISPLAY在远程数据库中没有正确定义,需要:
set DISPLAY=localComputer:0
export DISPLAY(取决于shell的不同而命令不同)
第二种情况:图形界面的功能不能在远程登陆的用户中定义和使用,需要:
使用oracle用户登录xwindow:应用xhost +命令
哥们你看我说的对你有帮助嘛我就知道那么多了

F. easyui 的datagrid请求的时候发送4次请求,是这么回事呢

var grid = $("#dg");
grid.datagrid({
border:false,
fit:true,
idField:"id",
url:'activity/find',
pagination:true,
rownumbers:true,
singleSelect:true,
columns:[[
{field:'id',title:'ID',width:100},
{field:'title',title:'标题',width:300},
{field:'hotline',title:'热线',width:60},
{field:'status',title:'状态',width:60,formatter:function(v){
if(v == "1")
return "进行中";
else if(v == "2")
return "已结束";
}},
{field:'order_num',title:'显示顺序',width:60},
{field:'start_time',title:'开始时间',width:100},
{field:'end_time',title:'结束时间',width:100},
{field:'created_time',title:'创建时间', formatter:WebUtil.easyui.formatter.millisecond},
{field:'updated_time',title:'更新时间', formatter:WebUtil.easyui.formatter.millisecond}
]],
toolbar:[{
iconCls:"icon-reload",
text:"刷新",
handler:function(){
grid.datagrid('reload');
}
}, "-", {
iconCls:"icon-add",
text:"添加",
handler:function(){}
},{
iconCls:"icon-edit",
text:"修改",
handler:function(){}
},{
iconCls:"icon-remove",
text:"删除",
handler:function(){}
}]
});

照这个逻辑写,同时注意是否其他加载代码里面调用了datagrid加载。

G. 怎么获取springmvc的参数

问题条理不太清晰
看着很费劲
太长了
回答问题:
前三个参数,具有指定含义的,你的意思是想省略,但又要用到,最好隐藏起来
理论上来说这三个参数可以声明在类中方法体外,哪些方法需要再进行调用
但实际上这样线程不安全,多个不同的请求调用同一个,多线程会出问题
所以一般来说都是需要定义在方法形参中

H. C#中UDP地址十进制转二进制算法

刚好我前一阵前了一个简单的协议框架。我也是对二进制、十进制、16进制这些来回转换很头疼。当时我是写一个工具类专门负责各种转换。下面把这个类的代码贴出来。


///<summary>
///协议工具
///</summary>
publicclassProtocolUtil
{

///<summary>
///从一个缓冲区复制数据到另一个缓冲区
///</summary>
///<paramname="input">需要复制数据的缓冲区</param>
///<paramname="output">保存结果的缓冲区</param>
///<returns></returns>
publicstaticintCopyBuffer(byte[]input,byte[]output)
{
//if(input.Length<output.Length)
//{
//returnfalse;
//}
intCounter=0;
for(inti=0;i<input.Length&&i<output.Length;i++)
{
output[i]=input[i];
Counter++;
}
returnCounter;

}


///<summary>
///端口转换成字节
///</summary>
///<paramname="port"></param>
///<returns></returns>
publicstaticstringPort2Hix(intport)
{
stringResult=port.ToString("X4");
returnResult;
}


///<summary>
///从字节当中获取整数,高位在前,可用于端口号、长度
///</summary>
///<remarks>
///注意16进制和10进制的换算。
///byte[]{30,22}对应的是7702
///但是16进制的是3022,对应的是12322
///</remarks>
///<paramname="inputBytes"></param>
///<paramname="start"></param>
///<paramname="size"></param>
///<returns></returns>
publicstaticintGetInt(byte[]inputBytes,intstart,intsize)
{
if(start>=0&&start<inputBytes.Length&&start+size-1<inputBytes.Length)
{
intResult=0;
intk=0;
for(inti=size;i>0;i--)
{
intm=inputBytes[start+i-1];
intn=m*(int)Math.Pow(256f,k);

Result+=n;
k++;
}
returnResult;
}

return0;
}

publicstaticbyte[]StringArr2Buffer(string[]strArr)
{
byte[]Arr1=newbyte[strArr.Length];

for(inti=0;i<strArr.Length;i++)
{
Arr1[i]=String2Byte(strArr[i]);

x.Say(i+":十六进制显示"+strArr[i]+"byte显示"+Arr1[i]+"二进制显示:"+OneZeroString(Arr1[i]));
}
returnArr1;

}

///<summary>
///十六进制的字符串FFEE形式转换为二进制
///</summary>
///<paramname="s"></param>
///<returns></returns>
publicstaticbyte[]X2String2Bytes(strings)
{
intLen=0;
if(s.Length%2==0)
{
Len=s.Length/2;
}
else
{
Len=s.Length/2+1;
}

byte[]Arr1=newbyte[Len];

for(inti=0;i<Len;i++)
{
stringMM=s.Substring(i*2,2);
Arr1[i]=String2Byte(MM);

x.Say(i+":十六进制显示"+MM+"byte显示"+Arr1[i]+"二进制显示:"+OneZeroString(Arr1[i]));
}
returnArr1;
}


///<summary>
///二进制的01形式转换成字符串形式,结果就是01110110
///</summary>
///<paramname="input"></param>
///<returns></returns>
(byteinput)
{
returnConvert.ToString(input,2);
}

publicstaticstringByte2String(byteinput)
{

returninput.ToString("X2");
}

publicstaticbyteString2Byte(stringinput)
{
//把字符串认为是16进制数据,转换成byte
returnbyte.Parse(input,System.Globalization.NumberStyles.HexNumber);

}


}


代码当中用到了另一个类x,这个是用来在调试的时候输出信息的。代码如下。

usingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Diagnostics;


namespaceXP
{
///<summary>
///调试的时候,用来跟踪过程和反应信息类
///</summary>
publicclassx
{
publicstaticvoidSay(stringmsg)
{
if(EnableDebug)
{
Trace.WriteLine(msg);
}
}

publicstaticvoidTimerLog(stringlog)
{
log+="[当前时间:"+DateTime.Now.ToString("yyyyMMddhh:mm:ss.ffff")+"]";
Say(log);
}
///<summary>是否允许开启Debug模式</summary>
///<remarks>
///通过配置文件开启Debug模式以后可以在网站运行时提供一些额外的调试信息,辅助诊断问题。
///</remarks>
publicstaticboolEnableDebug
{
get
{
#ifDEBUG
boolResult=true;
if(Result)
returntrue;
#endif
//stringEnableDebugConfig=SA.WebUtil.Common.Config.ConfigReader.CreateInstance().GetConfigItem("EnableDebug");
////stringEnableDebugConfig="1";
//if(String.IsNullOrEmpty(EnableDebugConfig))
//{
//returnfalse;
//}
//if("1"==EnableDebugConfig||"true"==EnableDebugConfig.ToLower())
//returntrue;
returnfalse;
}

}

}
}