主题:  cf chat

s22

职务:版主
等级:4
金币:10.0
发贴:1634
#12003/10/24 18:38:07
在easycfm看到一篇简单的CF CHAT聊天制作教程,写了个CFC准备做个FLASH CHAT的.
先贴出来
昨天WANGKING给讲解了一些他的诀窍,改天让他讲讲.
由于用FLASH 调用不涉及刷新页面的PI PI PA PA的声音,所以代码就比较简单啦.
功能有待加强.
application.cfm
//==============

             clientmanagement="Yes"
sessionmanagement="Yes"
sessiontimeout="#CreateTimeSpan(0,0,15,0)#"
applicationtimeout="#CreateTimeSpan(0,2,0,0)#">
            


//======================

chat.cfc
//=============================


        
        
            
            
        

        
        
        
        

    

    
        
        
        
        
        
             arrayappend(application.msg,"#user# 对 #to# 说: #msg#");
        

        

    

    
    
    
        
            
            
            

            
        

        
    


//====================================
test.cfm
//================



tp=createObject("component","chat.chat");
tp.init();
tp.postmsg("6666666666","dddddddddd","e");
x=tp.getmsg();





Untitled Document