仓酷云

标题: ASP.NET编程:c#封装jmail的pop3收邮件 [打印本页]

作者: 莫相离    时间: 2015-1-16 22:31
标题: ASP.NET编程:c#封装jmail的pop3收邮件
以前很热炒跨平台,主要是由于硅谷挑战微软霸主地位的热情,但是冷静下来后,跨平台往往不是那么一回事。假设你有个软件,所谓的跨平台,你只需要为第二个平台上重新编译一次就行了,这样很难么?jmail|封装|收邮件*
w3JMailv4.4Professional的猎取请自行google!
或参阅http://community.csdn.net/Expert/TopicView.asp?id=3739405
w3JMailv4.4Professional是一个COM的组件,我用C#把其POP3COM类封装成
一个用于收取邮件的.Net组件:
完成了
//同步事务
publiceventMessagesEventHandlerMessageReceived;//一封邮件已收到当地
publiceventMessagesEventHandlerMessageReceive;//一封邮件正抵达
//可用于收取邮件的每一个附件处置
publiceventAttachmentsEventHandlerAttachmentReceive;//一封邮件的附件正抵达

//产生非常事务
publiceventMessagesEventHandlerMessageException;
publiceventAttachmentsEventHandlerAttachmentException;

因而在挪用该组件的主调程序中可依据剖析邮件的主题或附件等了局作分歧处置!
将以下一切代码:
1.复制到MicrosoftVisualStudio.Net2003的新建的"把持台使用程序"项目标*.cs文件中
2.然后增加援用JMail4.xLibrary!
jmail的注册办法,运转命令行:regsvr32e:jmailjmail.dll
3.F5运转

大概
将以下一切代码:
1.复制就任意一个*.cs文件中保留!(如:e:        empNJMail.cs)
2.利用tlbimp.exe(范例库导进程序)有用工具天生一个.Net程序集
实行命令行:(位于MsVS.Net安装目次下的:E:MsVS.NetSDKv1.1BinTlbImp.exe)
tlbimp.exee:jmailjmail.dll/out:e:        empjmail.net.dll/namespace:jmail
天生的jmail.net.dll与*.cs文件放在统一目次下!
3.实行csc命令行编译*.cs
编译成exe:(这里是为了演示测试效果以是编译成exe)
csc.exeNJMail.cs/r:jmail.net.dll
编译成dll,便可由其余.Net程序增加援用:
csc.exe/t:libraryNJMail.cs/r:jmail.net.dll

(固然也可将namespaceMicroshaoft.NJMail下的代码独自编译成dll)
*/

namespaceMicroshaoft.NJMail
{
//usingjmail;
//usingSystem;

publicclassPOP3
{
publicdelegatevoidMessagesEventHandler(MessagesStateoMessagesState);
publicdelegatevoidAttachmentsEventHandler(AttachmentsStateoAttachmentsState);

//异步事务
publiceventMessagesEventHandlerMessagesReceiveAsync;
publiceventAttachmentsEventHandlerAttachmentsReceiveAsync;

//同步事务
publiceventMessagesEventHandlerMessageReceived;
publiceventMessagesEventHandlerMessageReceive;
publiceventAttachmentsEventHandlerAttachmentReceive;

//产生非常事务
publiceventMessagesEventHandlerMessageException;
publiceventAttachmentsEventHandlerAttachmentException;

privatestring_UserName;
privatestring_Password;
privatestring_Server;
privateint_Port=110;

privatestaticobject_LockObject=newobject();
publicPOP3(stringUserName,stringPassword,stringServer,intPort)
{
this._UserName=UserName;
this._Password=Password;
this._Server=Server;
this._Port=Port;
}

publicPOP3(stringUserName,stringPassword,stringServer)
{
this._UserName=UserName;
this._Password=Password;
this._Server=Server;
}

//[MTAThread]
publicvoidExecute()
{
this.Execute(false);
}

publicvoidExecute(boolIsAsync)
{
jmail.POP3Classpop3=newjmail.POP3Class();
try
{
pop3.Timeout=0;
pop3.Connect(this._UserName,this._Password,this._Server,this._Port);
jmail.MessagesClassjms=(jmail.MessagesClass)pop3.Messages;
intI=jms.Count;
MessagesStateomss=null;
for(inti=0;i<I-1;i++)
{
try
{
jmail.MessageClassjmc=(jmail.MessageClass)jms[i+1];
if(omss==null)
{
omss=newMessagesState(i+1,jmc,jms,pop3);
if(this.MessageReceive!=null)
{
this.MessageReceive(omss);
}
}
if(!omss.CancelCurrent)
{
if(IsAsync)
{
//System.IAsyncResultiar=
(newMessagesEventHandler(this.MessageExecuteAsync)).BeginInvoke(omss,newSystem.AsyncCallback(this.OnMessageCallBack),omss);
}
else
{
intJ=jmc.Attachments.Count;
AttachmentsStateoass=null;
for(intj=0;j<J;j++)
{
try
{
if(oass==null)
{
oass=newAttachmentsState(j,omss);
if(this.AttachmentReceive!=null)
{
this.AttachmentReceive(oass);
}
}
if(!oass.CancelCurrent)
{
strings=oass.FileName;
omss.SetFilePath(System.IO.Path.GetDirectoryName(s)+@"");
oass.SaveToFile(s);
}
}
catch(System.Exceptione)
{
if(this.AttachmentException!=null)
{
oass.Exception=e;
this.AttachmentException(oass);
if(oass.ExceptionAction==Microshaoft.NJMail.ExceptionActions.CancelAll)
{
break;
}
else
if(oass.ExceptionAction==Microshaoft.NJMail.ExceptionActions.Retry)
{
j--;
}
else
if(oass.ExceptionAction==Microshaoft.NJMail.ExceptionActions.Ignore)
{
//continue;
}
else
if(oass.ExceptionAction==Microshaoft.NJMail.ExceptionActions.Throw)
{
throwe;
}
}
else
{
throwe;
}
}
}
if(this.MessageReceived!=null)
{
this.MessageReceived(omss);
}
}
}
}
catch(System.Exceptione)
{
if(this.MessageException!=null)
{
omss.Exception=e;
this.MessageException(omss);
if(omss.ExceptionAction==Microshaoft.NJMail.ExceptionActions.CancelAll)
{
break;
}
else
if(omss.ExceptionAction==Microshaoft.NJMail.ExceptionActions.Retry)
{
i--;
}
else
if(omss.ExceptionAction==Microshaoft.NJMail.ExceptionActions.Ignore)
{
//continue;
}
else
if(omss.ExceptionAction==Microshaoft.NJMail.ExceptionActions.Throw)
{
throwe;
}
}
else
{
throwe;
}
}
}
}
catch(System.Exceptione)
{
throwe;
}
finally
{
pop3.Disconnect();
pop3=null;
}
//System.Console.WriteLine("mainend");
}

//[MTAThread]
privatevoidMessageExecuteAsync(MessagesStateoMessagesState)
{
intJ=oMessagesState.jMessage.Attachments.Count;
for(intj=0;j<J;j++)
{
AttachmentsStateoass=newAttachmentsState(j,oMessagesState);
//System.IAsyncResultiar=
(newAttachmentsEventHandler(this.AttachmentExecuteAsync)).BeginInvoke(oass,newSystem.AsyncCallback(this.OnAttachemnetCallBack),oass);
}
}

//[MTAThread]
privatevoidAttachmentExecuteAsync(AttachmentsStateoAttachmentsState)
{
//
}

//[MTAThread]
privatevoidOnMessageCallBack(System.IAsyncResultiar)
{
MessagesStateomss=(MessagesState)iar.AsyncState;
if(this.MessagesReceiveAsync!=null)
{
if(omss.jMessage.Attachments.Count==0)
{
this.MessagesReceiveAsync(omss);
}
}
}

//[MTAThread]
privatevoidOnAttachemnetCallBack(System.IAsyncResultiar)
{
AttachmentsStateoass=(AttachmentsState)iar.AsyncState;
if(this.AttachmentsReceiveAsync!=null)
{
this.AttachmentsReceiveAsync(oass);
}
if(!oass.CancelCurrent)
{
try
{
oass.SaveToFile(oass.FileName);
}
catch(System.Exceptione)
{
oass.Exception=e;
if(AttachmentException!=null)
{
AttachmentException(oass);
if(oass.ExceptionAction==Microshaoft.NJMail.ExceptionActions.CancelAll)
{

}
else
if(oass.ExceptionAction==Microshaoft.NJMail.ExceptionActions.Retry)
{
this.OnAttachemnetCallBack((System.IAsyncResult)oass);
}
else
if(oass.ExceptionAction==Microshaoft.NJMail.ExceptionActions.Ignore)
{

}
else
if(oass.ExceptionAction==Microshaoft.NJMail.ExceptionActions.Throw)
{
throwe;
}
}
}
}
if(this.MessagesReceiveAsync!=null)
{
if(oass.AttachmentsCount==0)
{
this.MessagesReceiveAsync(oass.MessagesState);
}
}
}
}

publicclassMessagesState//Messages形态
{
privatestaticobject_LockObject=newobject();
privateint_MessageID;
privatejmail.MessageClass_jMessage;
privatejmail.MessagesClass_jMessages;
privatejmail.POP3Class_jPOP3;
privatestring_FilePath;
privatebool_CancelCurrent;

privateSystem.Exception_Exception;
privateExceptionActions_ExceptionAction;


publicExceptionActionsExceptionAction
{
get
{
return_ExceptionAction;
}
set
{
this._ExceptionAction=value;
}
}

publicSystem.ExceptionException
{
get
{
return_Exception;
}
set
{
this._Exception=value;
}
}

publicstringFilePath
{
get
{
returnthis._FilePath;
}
}

internalvoidSetFilePath(stringFilePath)
{
this._FilePath=FilePath;
}

publicboolCancelCurrent
{
get
{
returnthis._CancelCurrent;
}
set
{
this._CancelCurrent=value;
}
}

publicintMessagesCount//还没有处置的邮件数
{
get
{
//lock(MessagesState._LockObject)
{
returnthis._jMessages.Count-this._MessageID-1;
}
}
}

publicjmail.MessagesClassjMessages
{
get
{
returnthis._jMessages;
}
}

publicjmail.MessageClassjMessage
{
get
{
returnthis._jMessage;
}
}

publicintMessageID
{
get
{
returnthis._MessageID;
}
}

internalMessagesState(intMessageID,jmail.MessageClassjMessage,jmail.MessagesClassjMessages,jmail.POP3ClassjPOP3)
{
this._MessageID=MessageID;
this._jMessage=jMessage;
this._jMessages=jMessages;
this._jPOP3=jPOP3;
}

publicvoidDeleteSingleMessage()
{
lock(MessagesState._LockObject)
{
this.DeleteSingleMessage(this._MessageID);
}

}

publicvoidDeleteSingleMessage(intMessageID)
{
lock(MessagesState._LockObject)
{
this._jPOP3.DeleteSingleMessage(MessageID);
}
}

publicvoidDeleteMessages()
{
lock(MessagesState._LockObject)
{
this._jPOP3.DeleteMessages();
}
}
}


publicenumExceptionActions
{
CancelAll,Ignore,Retry,Throw
}
publicclassAttachmentsState//Attachments形态
{
privateMessagesState_MessagesState;
privateint_AttachmentID;
privatestring_FileName;
privatestaticobject_LockObject=newobject();
privatejmail.AttachmentClass_jAttachment;
privatebool_CancelCurrent;
privateSystem.Exception_Exception;
privateExceptionActions_ExceptionAction;
publicExceptionActionsExceptionAction
{
get
{
return_ExceptionAction;
}
set
{
this._ExceptionAction=value;
}
}
publicSystem.ExceptionException
{
get
{
return_Exception;
}
set
{
this._Exception=value;
}
}
publicboolCancelCurrent
{
get
{
returnthis._CancelCurrent;
}
set
{
this._CancelCurrent=value;
}
}
publicjmail.AttachmentClassjAttachment
{
get
{
returnthis._jAttachment;
}
}
publicintAttachmentsCount//还没有处置的邮件附件数
{
get
{
//lock(AttachmentsState._LockObject)
{
returnthis._MessagesState.jMessage.Attachments.Count-this._AttachmentID-1;
}
}
}
publicstringFileName
{
get
{
returnthis._FileName;
}
set
{
this._FileName=value;
}
}
publicMessagesStateMessagesState
{
get
{
returnthis._MessagesState;
}
}
publicintAttachmentID
{
get
{
returnthis._AttachmentID;
}
}
publicvoidSaveToFile(stringFileName)
{
//if(!this.CancelCurrent)
{
this._jAttachment.SaveToFile(FileName);
}
}
internalAttachmentsState(intAttachmentID,MessagesStateoMessagesState)
{
this._MessagesState=oMessagesState;
this._AttachmentID=AttachmentID;
this._jAttachment=(jmail.AttachmentClass)oMessagesState.jMessage.Attachments[AttachmentID];
this._FileName=System.String.Format("[{0}].{1}.[{2}].{3}",oMessagesState.MessageID,oMessagesState.jMessage.Subject,AttachmentID,this._jAttachment.Name);
}
}
}
//================================================================================================
//把持台测试程序:
namespaceConsoleApplicationTest
{
usingMicroshaoft.NJMail;
usingPOP=Microshaoft.NJMail.POP3;
classAppTest
{
POPPop1;
boolIsBusy=false;
staticvoidMain()
{
//挪用Windows测试程序
System.Console.WriteLine("WindowsApplicationTestBegin:");
WindowsApplicationTest.Form1.Main0();
System.Console.WriteLine("WindowsApplicationTestEnd.");
System.Console.WriteLine("ConsoleApplicationTestBegin:");
AppTesta=newAppTest();
a.Pop1=newPOP("UserName","Password","mail.xxx.com");
//定阅异步事务
a.Pop1.MessagesReceiveAsync+=newMicroshaoft.NJMail.POP3.MessagesEventHandler(a.Pop1_MessagesReceiveAsync);
a.Pop1.AttachmentsReceiveAsync+=newMicroshaoft.NJMail.POP3.AttachmentsEventHandler(a.Pop1_AttachmentsReceiveAsync);
//定阅同步事务
a.Pop1.MessageReceived+=newMicroshaoft.NJMail.POP3.MessagesEventHandler(a.Pop1_MessageReceived);
a.Pop1.AttachmentReceive+=newMicroshaoft.NJMail.POP3.AttachmentsEventHandler(a.Pop1_AttachmentReceive);
a.Pop1.MessageReceive+=newMicroshaoft.NJMail.POP3.MessagesEventHandler(a.Pop1_MessageReceive);
//定阅Exception事务
a.Pop1.AttachmentException+=newMicroshaoft.NJMail.POP3.AttachmentsEventHandler(a.Pop1_AttachmentException);
a.Run();
System.Timers.Timert=newSystem.Timers.Timer();
t.Interval=1000*30;//每30秒收取一次邮件
t.Enabled=true;
t.Elapsed+=newSystem.Timers.ElapsedEventHandler(a.t_Elapsed);
while(System.Console.ReadLine().ToLower()!="exit")
{
System.Console.WriteLine("press"exit"toexitthisprograme!");
}
}
privatevoidt_Elapsed(objectsender,System.Timers.ElapsedEventArgse)
{
this.Run();
}
privatevoidRun()
{
if(!IsBusy)
{
System.Console.WriteLine("Busy");
this.IsBusy=true;
//this.Pop1.Execute(true);//异步实行
this.Pop1.Execute();//同步实行
this.IsBusy=false;
System.Console.WriteLine("Idle");
System.Console.WriteLine("press"exit"toexitthisprograme!");
}
}
privatevoidPop1_MessagesReceiveAsync(MessagesStateoMessagesState)
{
System.Console.WriteLine("Message:[{0}].{1}of{2}Messageshavebeenrecieved!{3}",oMessagesState.MessageID,oMessagesState.jMessage.Subject,oMessagesState.jMessages.Count-1,oMessagesState.MessagesCount);
if(oMessagesState.MessagesCount==0)
{
System.Console.WriteLine("allmessageshavebeenrecieved!");
}
}
privatevoidPop1_AttachmentsReceiveAsync(AttachmentsStateoAttachmentsState)
{

oAttachmentsState.SaveToFile(@"E:jmailAttachments["+System.Guid.NewGuid().ToString()+"]."+oAttachmentsState.FileName);
oAttachmentsState.FileName=@"E:jmailAttachments["+System.Guid.NewGuid().ToString()+"]."+oAttachmentsState.FileName;
if(oAttachmentsState.AttachmentsCount==0)
{
System.Console.WriteLine("[{0}].{1}havebeenrecieved!",oAttachmentsState.MessagesState.MessageID,oAttachmentsState.MessagesState.jMessage.Subject);
//异步实行删除有毛病
//oAttachmentsState.MessagesState.DeleteSingleMessage(oAttachmentsState.MessagesState.MessageID);
}
//oAttachmentsState.CancelCurrent=true;
}
privatevoidPop1_MessageReceived(MessagesStateoMessagesState)
{
System.Console.WriteLine("Message:[{0}].{1}of{2}Messageshavebeenrecieved!{3}",oMessagesState.MessageID,oMessagesState.jMessage.Subject,oMessagesState.jMessages.Count-1,oMessagesState.MessagesCount);
//能够每收完一封邮件即删除
//oMessagesState.DeleteSingleMessage(oMessagesState.MessageID);
}
privatevoidPop1_AttachmentReceive(AttachmentsStateoAttachmentsState)
{
//oAttachmentsState.CancelCurrent=true;
oAttachmentsState.SaveToFile(@"E:jmailAttachments["+System.Guid.NewGuid().ToString()+"]."+oAttachmentsState.FileName);
oAttachmentsState.FileName=@"E:jmailAttachments["+System.Guid.NewGuid().ToString()+"]."+oAttachmentsState.FileName;
//oAttachmentsState.CancelCurrent=true;
}
privatevoidPop1_MessageReceive(MessagesStateoMessagesState)
{
//oMessagesState.CancelCurrent=false;
}
privatevoidPop1_AttachmentException(Microshaoft.NJMail.AttachmentsStateoAttachmentsState)
{
System.Console.WriteLine("ExecuteException:{0}",oAttachmentsState.Exception.Message);
oAttachmentsState.FileName="e:        empcopyof"+oAttachmentsState.jAttachment.Name;
oAttachmentsState.ExceptionAction=Microshaoft.NJMail.ExceptionActions.Retry;//上一句文件更名后从头处置
oAttachmentsState.ExceptionAction=Microshaoft.NJMail.ExceptionActions.Ignore;//处置下一个附件
//oAttachmentsState.ExceptionAction=Microshaoft.NJMail.ExceptionActions.Throw;
}
}
}
//================================================================================================
//Windows测试程序:
namespaceWindowsApplicationTest
{
usingSystem;
usingSystem.Windows.Forms;
///<summary>
///Form1的择要申明。
///</summary>
publicclassForm1:System.Windows.Forms.Form
{
privateSystem.Windows.Forms.Buttonbutton1;
privateSystem.Windows.Forms.Timertimer1;
privateSystem.ComponentModel.IContainercomponents;
publicForm1()
{
//
//Windows窗体计划器撑持所必须的
//
InitializeComponent();
//
//TODO:在InitializeComponent挪用后增加任何机关函数代码
//
}
///<summary>
///清算一切正在利用的资本。
///</summary>
protectedoverridevoidDispose(booldisposing)
{
if(disposing)
{
if(components!=null)
{
components.Dispose();
}
}
base.Dispose(disposing);
}
#regionWindows窗体计划器天生的代码
///<summary>
///计划器撑持所需的办法-不要利用代码编纂器修正
///此办法的内容。
///</summary>
privatevoidInitializeComponent()
{
this.components=newSystem.ComponentModel.Container();
this.button1=newSystem.Windows.Forms.Button();
this.timer1=newSystem.Windows.Forms.Timer(this.components);
this.SuspendLayout();
//
//button1
//
this.button1.Location=newSystem.Drawing.Point(24,24);
this.button1.Name="button1";
this.button1.Size=newSystem.Drawing.Size(80,40);
this.button1.TabIndex=0;
this.button1.Text="button1";
this.button1.Click+=newSystem.EventHandler(this.button1_Click);
//
//timer1
//
this.timer1.Tick+=newSystem.EventHandler(this.timer1_Tick);
//
//Form1
//
this.AutoScaleBaseSize=newSystem.Drawing.Size(6,14);
this.ClientSize=newSystem.Drawing.Size(292,273);
this.Controls.Add(this.button1);
this.Name="Form1";
this.Text="Form1";
this.ResumeLayout(false);
}
#endregion
///<summary>
///使用程序的主出口点。
///</summary>
[STAThread]
publicstaticvoidMain0()//Main()//若要独自的Windows程序可再换回Main()
{
Application.Run(newForm1());
}
privateMicroshaoft.NJMail.POP3x;
privatevoidbutton1_Click(objectsender,System.EventArgse)
{
button1.Enabled=false;
x=newMicroshaoft.NJMail.POP3("UserName","Password","mail.xxx.com");
x.MessageReceive+=newMicroshaoft.NJMail.POP3.MessagesEventHandler(x_MessageReceive);
x.MessageReceived+=newMicroshaoft.NJMail.POP3.MessagesEventHandler(x_MessageReceived);
x.AttachmentReceive+=newMicroshaoft.NJMail.POP3.AttachmentsEventHandler(x_AttachmentReceive);
x.AttachmentException+=newMicroshaoft.NJMail.POP3.AttachmentsEventHandler(x_AttachmentException);
timer1.Interval=1000*120;//每120秒收取一次邮件
timer1.Enabled=false;
x.Execute();
button1.Enabled=true;
}
privatevoidx_MessageReceive(Microshaoft.NJMail.MessagesStateoMessagesState)
{
//System.Windows.Forms.MessageBox.Show(oMessagesState.MessageID.ToString());
System.Console.WriteLine("{0},《{1}》",oMessagesState.MessageID.ToString(),oMessagesState.jMessage.Subject);

//System.Console.WriteLine(oMessagesState.jMessage.Body);
//System.Console.WriteLine(oMessagesState.jMessage.Text);
}
privatevoidtimer1_Tick(objectsender,System.EventArgse)
{
x.Execute();
}
privatevoidx_MessageReceived(Microshaoft.NJMail.MessagesStateoMessagesState)
{
if(oMessagesState.MessagesCount==0)
{
//System.Windows.Forms.MessageBox.Show("gameover");
}
else
{
System.Console.WriteLine(oMessagesState.MessageID.ToString());
}
}
privatevoidx_AttachmentReceive(Microshaoft.NJMail.AttachmentsStateoAttachmentsState)
{
oAttachmentsState.FileName="e:        emp"+oAttachmentsState.FileName;
oAttachmentsState.SaveToFile(oAttachmentsState.FileName);
if(oAttachmentsState.Exception!=null)
{
throwoAttachmentsState.Exception;
}
oAttachmentsState.CancelCurrent=true;//不Save处置以后附件
if(oAttachmentsState.AttachmentsCount==0)
{
//System.Windows.Forms.MessageBox.Show(oAttachmentsState.MessagesState.jMessage.Attachments.Count.ToString());
}
else
{
System.Console.WriteLine(oAttachmentsState.AttachmentID.ToString());
}
}
privatevoidx_AttachmentException(Microshaoft.NJMail.AttachmentsStateoAttachmentsState)
{
System.Console.WriteLine("ExecuteException:{0}",oAttachmentsState.Exception.Message);
oAttachmentsState.FileName="e:        empcopyof"+oAttachmentsState.jAttachment.Name;
//oAttachmentsState.ExceptionAction=Microshaoft.NJMail.ExceptionActions.Retry;//上一句文件更名后从头处置
oAttachmentsState.ExceptionAction=Microshaoft.NJMail.ExceptionActions.Ignore;//处置下一个附件
//oAttachmentsState.ExceptionAction=Microshaoft.NJMail.ExceptionActions.Throw;
}
}
}

那做企业软件是不是最好用J2EE?
作者: 活着的死人    时间: 2015-1-19 16:02
ASP.NET:ASP.net是Microsoft.net的一部分,作为战略产品,不仅仅是ActiveServerPage(ASP)的下一个版本;它还提供了一个统一的Web开发模型,其中包括开发人员生成企业级Web应用程序所需的各种服务。ASP.NET的语法在很大程度上与ASP兼容,同时它还提供一种新的编程模型和结构,可生成伸缩性和稳定性更好的应用程序,并提供更好的安全保护。
作者: 再现理想    时间: 2015-1-25 21:59
代码的可重用性差:由于是面向结构的编程方式,并且混合html,所以可能页面原型修改一点,整个程序都需要修改,更别提代码重用了。
作者: 山那边是海    时间: 2015-2-4 06:45
主流网站开发语言之CGI:CGI就是公共网关接口(CommonGatewayInterface)的缩写。它是最早被用来建立动态网站的后台技术。这种技术可以使用各种语言来编写后台程序,例如C,C++,Java,Pascal等。
作者: 精灵巫婆    时间: 2015-2-9 17:54
平台无关性是PHP的最大优点,但是在优点的背后,还是有一些小小的缺点的。如果在PHP中不使用ODBC,而用其自带的数据库函数(这样的效率要比使用ODBC高)来连接数据库的话,使用不同的数据库,PHP的函数名不能统一。这样,使得程序的移植变得有些麻烦。不过,作为目前应用最为广泛的一种后台语言,PHP的优点还是异常明显的。
作者: 莫相离    时间: 2015-2-27 14:42
但是目前在CGI中使用的最为广泛的是Perl语言。所以,狭义上所指的CGI程序一般都是指Perl程序,一般CGI程序的后缀都是.pl或者.cgi。
作者: 老尸    时间: 2015-3-9 07:32
众所周知,Windows以易用而出名,也因此占据不少的服务器市场。
作者: 冷月葬花魂    时间: 2015-3-16 21:12
最强的技术支持WebService,而且有.NET的所有library做后盾。而且ASP.NET在.NET3.5中还有微软专门为AJAX开发的功能--ASP.NETAJAX。




欢迎光临 仓酷云 (http://ckuyun.com/) Powered by Discuz! X3.2