一、NuGet在Server,mvc中添加Common.Logging和common.Logging.Log4Net如下图

二、在Server层创建logger类

<?xml version="1.0" encoding="utf-8" ?>
<log4net>
<!--级别层级ALL<DEBUG<INFO<WARN<ERROR<FATAL<OFF -->
<!--调试日志-->
<appender name="debugLog" type="log4net.Appender.RollingFileAppender,log4net" >
<param name="File" value="logs\debug\debug.log" />
<param name="AppendToFile" value="true" />
<param name="RollingStyle" value="Date" />
<param name="DatePattern" value="yyyyMMdd" />
<param name="StaticLogFileName" value="true" />
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss}%newline%message%n" />
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="DEBUG" />
<param name="LevelMax" value="DEBUG" />
</filter>
</appender> <!--信息日志-->
<appender name="infoLog" type="log4net.Appender.RollingFileAppender,log4net" >
<param name="File" value="logs\info\info.log" />
<param name="AppendToFile" value="true" />
<param name="RollingStyle" value="Date" />
<param name="DatePattern" value="yyyyMMdd" />
<param name="StaticLogFileName" value="true" />
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n" />
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="INFO" />
<param name="LevelMax" value="INFO" />
</filter>
</appender> <!--错误日志-->
<appender name="errorLog" type="log4net.Appender.RollingFileAppender,log4net" >
<param name="File" value="logs\error\error.log" />
<param name="AppendToFile" value="true" />
<param name="RollingStyle" value="Date" />
<param name="DatePattern" value="yyyyMMdd" />
<param name="StaticLogFileName" value="true" />
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss}%newline%message%n" />
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="ERROR" />
<param name="LevelMax" value="ERROR" />
</filter>
</appender>
<!--警告日志-->
<appender name="warnLog" type="log4net.Appender.RollingFileAppender,log4net" >
<param name="File" value="logs\warn\warn.log" />
<param name="AppendToFile" value="true" />
<param name="RollingStyle" value="Date" />
<param name="DatePattern" value="yyyyMMdd" />
<param name="StaticLogFileName" value="true" />
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss}%newline%message%n" />
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="WARN" />
<param name="LevelMax" value="WARN" />
</filter>
</appender>
<!--致命错误日志-->
<appender name="fatalLog" type="log4net.Appender.RollingFileAppender,log4net" >
<param name="File" value="logs\fatal\fatal.log" />
<param name="AppendToFile" value="true" />
<param name="RollingStyle" value="Date" />
<param name="DatePattern" value="yyyyMMdd" />
<param name="StaticLogFileName" value="true" />
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss}%newline%message%n" />
</layout>
<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="FATAL" />
<param name="LevelMax" value="FATAL" />
</filter>
</appender> <appender name="LogToDB" type="log4net.Appender.AdoNetAppender">
<bufferSize value="1" />
<connectionType value="System.Data.SqlClient.SqlConnection, System.Data, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<connectionString value="Data Source=oa.ctitech.cn;Initial Catalog=logtest;Persist Security Info=True;User ID=sa;Password=zkx123" />
<commandText value="INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message],[Exception]) VALUES (@log_date, @thread, @log_level, @logger, @message, @exception)" />
<parameter>
<parameterName value="@log_date" />
<dbType value="DateTime" />
<layout type="log4net.Layout.RawTimeStampLayout" />
</parameter>
<parameter>
<parameterName value="@thread" />
<dbType value="String" />
<size value="255" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%thread" />
</layout>
</parameter>
<parameter>
<parameterName value="@log_level" />
<dbType value="String" />
<size value="50" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%level" />
</layout>
</parameter>
<parameter>
<parameterName value="@logger" />
<dbType value="String" />
<size value="255" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%logger" />
</layout>
</parameter>
<parameter>
<parameterName value="@message" />
<dbType value="String" />
<size value="4000" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%message" />
</layout>
</parameter>
<parameter>
<parameterName value="@exception" />
<dbType value="String" />
<size value="2000" />
<layout type="log4net.Layout.ExceptionLayout" />
</parameter>
<!--<filter type="log4net.Filter.LevelRangeFilter">
<param name="LevelMin" value="DEBUG" />
<param name="LevelMax" value="FATAL" />
</filter>-->
</appender>
<root>
<level value="ALL" />
<appender-ref ref="debugLog" />
<appender-ref ref="infoLog"/>
<appender-ref ref="warnLog" />
<appender-ref ref="errorLog" />
<appender-ref ref="fatalLog" />
<!--<appender-ref ref="LogToDB" />-->
</root>
<!--
CREATE TABLE [dbo].[Log] (
[Id] [int] IDENTITY (1, 1) NOT NULL,
[Date] [datetime] NOT NULL,
[Thread] [varchar] (255) NOT NULL,
[Level] [varchar] (50) NOT NULL,
[Logger] [varchar] (255) NOT NULL,
[Message] [varchar] (4000) NOT NULL,
[Exception] [varchar] (2000) NULL
)
-->
</log4net>

三、在mvc项目中添加log4net.config

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Text; namespace LogServer
{
public class Logger
{
#region Wrap common.logging static readonly Common.Logging.ILog log = Common.Logging.LogManager.GetCurrentClassLogger(); public static void Debug(IFormatProvider formatProvider, Action<Common.Logging.FormatMessageHandler> formatMessageCallback, Exception exception)
{
log.Debug(formatProvider, formatMessageCallback, exception);
} public static void Debug(IFormatProvider formatProvider, Action<Common.Logging.FormatMessageHandler> formatMessageCallback)
{
log.Debug(formatProvider, formatMessageCallback);
} public static void Debug(Action<Common.Logging.FormatMessageHandler> formatMessageCallback, Exception exception)
{
log.Debug(formatMessageCallback, exception);
} public static void Debug(Action<Common.Logging.FormatMessageHandler> formatMessageCallback)
{
log.Debug(formatMessageCallback);
} public static void Debug(object message, Exception exception)
{
log.Debug(message, exception);
} public static void Debug(object message)
{
log.Debug(message);
} public static void DebugFormat(IFormatProvider formatProvider, string format, Exception exception, params object[] args)
{
log.DebugFormat(formatProvider, format, exception, args);
} public static void DebugFormat(IFormatProvider formatProvider, string format, params object[] args)
{
log.DebugFormat(formatProvider, format, args);
} public static void DebugFormat(string format, Exception exception, params object[] args)
{
log.DebugFormat(format, exception, args);
} public static void DebugFormat(string format, params object[] args)
{
log.DebugFormat(format, args);
} public static void Error(IFormatProvider formatProvider, Action<Common.Logging.FormatMessageHandler> formatMessageCallback, Exception exception)
{
log.Error(formatProvider, formatMessageCallback, exception);
} public static void Error(IFormatProvider formatProvider, Action<Common.Logging.FormatMessageHandler> formatMessageCallback)
{
log.Error(formatProvider, formatMessageCallback);
} public static void Error(Action<Common.Logging.FormatMessageHandler> formatMessageCallback, Exception exception)
{
log.Error(formatMessageCallback, exception);
} public static void Error(Action<Common.Logging.FormatMessageHandler> formatMessageCallback)
{
log.Error(formatMessageCallback);
} public static void Error(object message, Exception exception)
{
log.Error(message, exception);
} public static void Error(object message)
{
log.Error(message);
} public static void ErrorFormat(IFormatProvider formatProvider, string format, Exception exception, params object[] args)
{
log.ErrorFormat(formatProvider, format, exception, args);
} public static void ErrorFormat(IFormatProvider formatProvider, string format, params object[] args)
{
log.ErrorFormat(formatProvider, format, args);
} public static void ErrorFormat(string format, Exception exception, params object[] args)
{
log.ErrorFormat(format, exception, args);
} public static void ErrorFormat(string format, params object[] args)
{
log.ErrorFormat(format, args);
} public static void Fatal(IFormatProvider formatProvider, Action<Common.Logging.FormatMessageHandler> formatMessageCallback, Exception exception)
{
log.Fatal(formatProvider, formatMessageCallback, exception);
} public static void Fatal(IFormatProvider formatProvider, Action<Common.Logging.FormatMessageHandler> formatMessageCallback)
{
log.Fatal(formatProvider, formatMessageCallback);
} public static void Fatal(Action<Common.Logging.FormatMessageHandler> formatMessageCallback, Exception exception)
{
log.Fatal(formatMessageCallback, exception);
} public static void Fatal(Action<Common.Logging.FormatMessageHandler> formatMessageCallback)
{
log.Fatal(formatMessageCallback);
} public static void Fatal(object message, Exception exception)
{
log.Fatal(message, exception);
} public static void Fatal(object message)
{
log.Fatal(message);
} public static void FatalFormat(IFormatProvider formatProvider, string format, Exception exception, params object[] args)
{
log.FatalFormat(formatProvider, format, exception, args);
} public static void FatalFormat(IFormatProvider formatProvider, string format, params object[] args)
{
log.FatalFormat(formatProvider, format, args);
} public static void FatalFormat(string format, Exception exception, params object[] args)
{
log.FatalFormat(format, exception, args);
} public static void FatalFormat(string format, params object[] args)
{
log.FatalFormat(format, args);
} public static void Info(IFormatProvider formatProvider, Action<Common.Logging.FormatMessageHandler> formatMessageCallback, Exception exception)
{
log.Info(formatProvider, formatMessageCallback, exception);
} public static void Info(IFormatProvider formatProvider, Action<Common.Logging.FormatMessageHandler> formatMessageCallback)
{
log.Info(formatProvider, formatMessageCallback);
} public static void Info(Action<Common.Logging.FormatMessageHandler> formatMessageCallback, Exception exception)
{
log.Info(formatMessageCallback, exception);
} public static void Info(Action<Common.Logging.FormatMessageHandler> formatMessageCallback)
{
log.Info(formatMessageCallback);
} public static void Info(object message, Exception exception)
{
log.Info(message, exception);
} public static void Info(object message)
{
log.Info(message);
} public static void InfoFormat(IFormatProvider formatProvider, string format, Exception exception, params object[] args)
{
log.InfoFormat(formatProvider, format, exception, args);
} public static void InfoFormat(IFormatProvider formatProvider, string format, params object[] args)
{
log.InfoFormat(formatProvider, format, args);
} public static void InfoFormat(string format, Exception exception, params object[] args)
{
log.InfoFormat(format, exception, args);
} public static void InfoFormat(string format, params object[] args)
{
log.InfoFormat(format, args);
} public bool IsDebugEnabled
{
get { return IsDebugEnabled; }
} public bool IsErrorEnabled
{
get { return IsErrorEnabled; }
} public bool IsFatalEnabled
{
get { return IsFatalEnabled; }
} public bool IsInfoEnabled
{
get { return IsInfoEnabled; }
} public bool IsTraceEnabled
{
get { return IsTraceEnabled; }
} public bool IsWarnEnabled
{
get { return IsWarnEnabled; }
} public static void Trace(IFormatProvider formatProvider, Action<Common.Logging.FormatMessageHandler> formatMessageCallback, Exception exception)
{
log.Trace(formatProvider, formatMessageCallback, exception);
} public static void Trace(IFormatProvider formatProvider, Action<Common.Logging.FormatMessageHandler> formatMessageCallback)
{
log.Trace(formatProvider, formatMessageCallback);
} public static void Trace(Action<Common.Logging.FormatMessageHandler> formatMessageCallback, Exception exception)
{
log.Trace(formatMessageCallback, exception);
} public static void Trace(Action<Common.Logging.FormatMessageHandler> formatMessageCallback)
{
log.Info(formatMessageCallback);
} public static void Trace(object message, Exception exception)
{
log.Info(message, exception);
} public static void Trace(object message)
{
log.Info(message);
} public static void TraceFormat(IFormatProvider formatProvider, string format, Exception exception, params object[] args)
{
log.InfoFormat(formatProvider, format, exception, args);
} public static void TraceFormat(IFormatProvider formatProvider, string format, params object[] args)
{
log.InfoFormat(formatProvider, format, args);
} public static void TraceFormat(string format, Exception exception, params object[] args)
{
log.InfoFormat(format, exception, args);
} public static void TraceFormat(string format, params object[] args)
{
log.InfoFormat(format, args);
} public static void Warn(IFormatProvider formatProvider, Action<Common.Logging.FormatMessageHandler> formatMessageCallback, Exception exception)
{
log.Warn(formatProvider, formatMessageCallback, exception);
} public static void Warn(IFormatProvider formatProvider, Action<Common.Logging.FormatMessageHandler> formatMessageCallback)
{
log.Warn(formatProvider, formatMessageCallback);
} public static void Warn(Action<Common.Logging.FormatMessageHandler> formatMessageCallback, Exception exception)
{
log.Warn(formatMessageCallback, exception);
} public static void Warn(Action<Common.Logging.FormatMessageHandler> formatMessageCallback)
{
log.Warn(formatMessageCallback);
} public static void Warn(object message, Exception exception)
{
log.Warn(message, exception);
} public static void Warn(object message)
{
log.Warn(message);
} public static void WarnFormat(IFormatProvider formatProvider, string format, Exception exception, params object[] args)
{
log.WarnFormat(formatProvider, format, exception, args);
} public static void WarnFormat(IFormatProvider formatProvider, string format, params object[] args)
{
log.WarnFormat(formatProvider, format, args);
} public static void WarnFormat(string format, Exception exception, params object[] args)
{
log.WarnFormat(format, exception, args);
} public static void WarnFormat(string format, params object[] args)
{
log.WarnFormat(format, args);
} #endregion #region logger with Diagnostics public static void TraceReflect(params string[] args)
{
try
{
StackFrame frame = new StackFrame();
MethodBase method = frame.GetMethod();
StackFrame frame2 = new StackFrame();
MethodBase method2 = frame2.GetMethod();
List<string> list = new List<string>();
if (method.DeclaringType != null)
{
string format = GetReflectLogFormat(args, method.DeclaringType.ToString(), method2.Name + "/" + method.Name, ref list);
Logger.TraceFormat(format, list.ToArray());
}
}
catch { }
} /// <summary>
/// 记录出错日志
/// </summary>
/// <param name="args">第一个参数默认为错误描述</param>
public static void ErrorReflect(params string[] args)
{
try
{
StackFrame frame = new StackFrame();
MethodBase method = frame.GetMethod();
List<string> list = new List<string>();
if (method.DeclaringType != null)
{
string format = GetReflectErrorFormat(args, method.DeclaringType.ToString(), method.Name, ref list);
Logger.ErrorFormat(format, list.ToArray());
}
}
catch { }
} public static void DebugReflect(params string[] args)
{
try
{
StackFrame frame = new StackFrame();
MethodBase method = frame.GetMethod();
StackFrame frame2 = new StackFrame();
MethodBase method2 = frame2.GetMethod();
List<string> list = new List<string>();
if (method.DeclaringType != null)
{
string format = GetReflectLogFormat(args, method.DeclaringType.ToString(),
method2.Name + "/" + method.Name, ref list);
Logger.DebugFormat(format, list.ToArray());
}
}
catch { }
} public static void FatalReflect(params string[] args)
{
try
{
StackFrame frame = new StackFrame();
MethodBase method = frame.GetMethod();
List<string> list = new List<string>();
if (method.DeclaringType != null)
{
string format = GetReflectLogFormat(args, method.DeclaringType.ToString(), method.Name, ref list);
Logger.FatalFormat(format, list.ToArray());
}
}
catch { }
} public static void InfoReflect(params string[] args)
{
try
{
StackFrame frame = new StackFrame();
MethodBase method = frame.GetMethod();
StackFrame frame2 = new StackFrame();
MethodBase method2 = frame2.GetMethod();
List<string> list = new List<string>();
if (method.DeclaringType != null)
{
string format = GetReflectLogFormat(args, method.DeclaringType.ToString(),
method2.Name + "/" + method.Name, ref list);
Logger.InfoFormat(format, list.ToArray());
}
}
catch { }
} /// <summary>
/// 获取错误日志的模板
/// </summary>
/// <param name="parms"></param>
/// <param name="classname"></param>
/// <param name="methodname"></param>
/// <param name="argelist"></param>
/// <returns></returns>
/// <summary>
private static string GetReflectErrorFormat(string[] parms, string classname, string methodname, ref List<string> argelist)
{
argelist.Add(classname);
argelist.Add(methodname);
StringBuilder sb = new StringBuilder("方法:{0}.{1}\r\n");
int l = parms.Length;
if (l > )
{
sb.Append("错误:{2}\r\n");
argelist.Add(parms[]);
if (l > )
{
sb.Append("参数:");
for (int i = ; i < l; i++)
{
sb.Append("[{" + (i + ) + "}],");
argelist.Add(parms[i]);
}
}
}
return sb.ToString().TrimEnd(',');
} /// <summary>
/// 获取调试信息的模板
/// </summary>
/// <param name="parms"></param>
/// <param name="classname"></param>
/// <param name="methodname"></param>
/// <param name="argelist"></param>
/// <returns></returns>
private static string GetReflectLogFormat(string[] parms, string classname, string methodname, ref List<string> argelist)
{
argelist.Add(classname);
argelist.Add(methodname);
StringBuilder sb = new StringBuilder("方法:{0}.{1}\r\n");
int l = parms.Length;
if (l > )
{
sb.AppendFormat("参数:");
for (int i = ; i < l; i++)
{
sb.Append("[{" + (i + ) + "}],");
argelist.Add(parms[i]);
}
}
return sb.ToString().TrimEnd(',');
}
#endregion } public class Log4NetPathPattern : log4net.Util.PatternConverter
{
protected override void Convert(System.IO.TextWriter writer, object state)
{
try
{
var dirstr = System.Configuration.ConfigurationManager.AppSettings["log4net:root"];
if (string.IsNullOrWhiteSpace(dirstr)) dirstr = "logs";
dirstr = dirstr.TrimStart('/', '\\', '~');
if (!Path.IsPathRooted(dirstr)) dirstr = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, dirstr);
writer.Write(dirstr);
//如果在本项目中用,可以把文件夹加上程序集名:Assembly.GetExecutingAssembly()
//否则只有在配置文件中加项目名了
}
catch
{
//出错则默认当前目录logs文件夹
writer.Write(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logs"));
} }
}
}

四、在web.config的<configSections>内部添加

 <sectionGroup name="common">
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
</sectionGroup>

五、在web.config的</configSections>的后面添加

<common>
<logging>
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4net">
<arg key="configType" value="FILE-WATCH" />
<!-- FILE,FILE-WATCH,INLINE,EXTERNAL-->
<arg key="configFile" value="~/log4net.config" />
<arg key="level" value="ALL" />
</factoryAdapter>
</logging>
</common>

六、创建测试类Class1进行调用所有类结构如下图

log4net简单用法的更多相关文章

  1. CATransition(os开发之画面切换) 的简单用法

    CATransition 的简单用法 //引进CATransition 时要添加包“QuartzCore.framework”,然后引进“#import <QuartzCore/QuartzCo ...

  2. jquery.validate.js 表单验证简单用法

    引入jquery.validate.js插件以及Jquery,在最后加上这个插件的方法名来引用.$('form').validate(); <!DOCTYPE html PUBLIC " ...

  3. NSCharacterSet 简单用法

    NSCharacterSet 简单用法 NSCharacterSet其实是许多字符或者数字或者符号的组合,在网络处理的时候会用到 NSMutableCharacterSet *base = [NSMu ...

  4. [转]Valgrind简单用法

    [转]Valgrind简单用法 http://www.cnblogs.com/sunyubo/archive/2010/05/05/2282170.html Valgrind的主要作者Julian S ...

  5. Oracle的substr函数简单用法

    substr(字符串,截取开始位置,截取长度) //返回截取的字 substr('Hello World',0,1) //返回结果为 'H'  *从字符串第一个字符开始截取长度为1的字符串 subst ...

  6. Ext.Net学习笔记19:Ext.Net FormPanel 简单用法

    Ext.Net学习笔记19:Ext.Net FormPanel 简单用法 FormPanel是一个常用的控件,Ext.Net中的FormPanel控件同样具有非常丰富的功能,在接下来的笔记中我们将一起 ...

  7. TransactionScope简单用法

    记录TransactionScope简单用法,示例如下: void Test() { using (TransactionScope scope = new TransactionScope()) { ...

  8. WPF之Treeview控件简单用法

    TreeView:表示显示在树结构中分层数据具有项目可展开和折叠的控件 TreeView 的内容是可以包含丰富内容的 TreeViewItem 控件,如 Button 和 Image 控件.TreeV ...

  9. listActivity和ExpandableListActivity的简单用法

    http://www.cnblogs.com/limingblogs/archive/2011/10/09/2204866.html 今天自己简单的总结了listActivity和Expandable ...

随机推荐

  1. 第002篇 深入体验C#项目开发(一)

    网上摘来的简介:        <深入体验C#项目开发>通过10个综合实例的实现过程,详细讲解了C#在实践项目中的综合运用过程.这些项目从作者的学生时代写起,到项目经理结束,一直贯穿于作者 ...

  2. android第三方分享之友盟社会化组件

    前言 现在几乎所有的app都带有分享功能,第一为了更好地推广自己的产品,第二作为使用者也能及时的把自己觉得好的文章,话题,app分享到社交平台供大家一起学习和使用.开发中虽然android系统自带分享 ...

  3. C#.NET面向对象(语法点)

    一.继承 C#中继承的规则 1:继承是可传递的 A:B   B:C 2:派生类应当是对基类的扩展.派生类可以添加新的成员,但不能除去已经继承的成员的定义. 3:构造函数和析构函数不能被继承 4:如果派 ...

  4. typedef和define的作用域

    typedef: 如果放在所有函数之外,它的作用域就是从它定义开始直到文件尾: 如果放在某个函数内,定义域就是从定义开始直到该函数结尾: #define: 不管是在某个函数内,还是在所有函数之外,作用 ...

  5. hdu2952Counting Sheep

    Problem Description A while ago I had trouble sleeping. I used to lie awake, staring at the ceiling, ...

  6. java字符串数组进行大小排序

    若是将两个字符串直接比较大小,会包:The operator > is undefined for the argument type(s) java.lang.String, java.lan ...

  7. Path Sum,Path Sum II

    Path Sum Total Accepted: 81706 Total Submissions: 269391 Difficulty: Easy Given a binary tree and a ...

  8. java基础知识——程序员面试基础

    一.面向对象的特征有哪些? 答:①.抽象:抽象是忽略一个主题中与当前目标无关的那些方面,一边更充分的注意与当前目标有关的方面.抽象并不打算了解全面问题,而是选择其中的一部分,暂时不用部分细节.抽象包括 ...

  9. [转]printf 字符串格式化

    在将各种类型的数据构造成字符串时,sprintf 的强大功能很少会让你失望.由于sprintf 跟printf 在用法上几乎一样,只是打印的目的地不同而已,前者打印到字符串中,后者则直接在命令行上输出 ...

  10. 使用ThinkPHP开发中MySQL性能优化的最佳21条经验

    使用ThinkPHP开发中MySQL性能优化的最佳21条经验讲解,目前,数据库的操作越来越成为整个应用的性能瓶颈了,这点对于Web应用尤其明显.关于数据库的性能,这并不只是DBA才需要担心的事,而这更 ...