<% ' +---------------------------------------------------------------------- ' | POPASP [ ASP MVC ] ' +---------------------------------------------------------------------- ' | Copyright (c) 2016 http://popasp.com All rights reserved. ' +---------------------------------------------------------------------- ' | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) ' +---------------------------------------------------------------------- ' | Author: popasp <1737025626@qq.com> ' +---------------------------------------------------------------------- Class POPASP_PAGETRACE public options private dataFileName function handlerLink( action,param,title,content ) dim href href = U_( array(C_("SYSTEM_MODULE") & "/" & action, param ) ) handlerLink = C_("TRACE_HANDLER_LINK") handlerLink = replace( handlerLink,"HREF",href ) handlerLink = replace( handlerLink,"TITLE",title ) handlerLink = replace( handlerLink,"CONTENT",content ) end function '读取文件 function readFile( file , title ) readFile = " " & handlerLink( "readFile","file=" & file ,title,C_("TRACE_READ_SHOW") ) end function '读取popasp_class结构 function readPOPASPClass( sClass ) readPOPASPClass = " " & handlerLink( "readPOPASPClass","class=" & sClass ,sClass," " & lcase(sClass) & " " ) end function '删除文件 function removeFile( file ,title ) removeFile = " " & delete( "removeFile" , "file=" & file , title ) end function '删除session function removeSession( sess_key , title ) removeSession = " " & delete( "removeSession" , "key=" & sess_key,title ) end function '读取session function readSession( sess_key , title ) readSession = " " & handlerLink( "readSession","key=" & sess_key ,title,C_("TRACE_READ_SHOW") ) end function function clearCompileDir( ) clearCompileDir = " " & deleteAll( "clearCompileDir" , "", "删除所有解析文件" ) end function sub show() dim tpl,content,fileName Call Assign() tpl = POP_MVC.mvc_dir & "Tpl/page_trace.html" content = POP_MVC.file_get_contents( tpl ) 'Randomize fileName = "./QQ_1737025626_POPASP_PAGE_TRACE_" & "" & "_QQ_GROUP_124648143.asp" '包含框架路径 if not isEmpty( POP_MVC.page_trace_include ) then content = replace( content,"",POP_MVC.page_trace_include ) elseif POP_MVC.String.StartsWith(POP_MVC.mvc_dir , "/" ) or POP_MVC.String.StartsWith(POP_MVC.mvc_dir , "\" ) then content = replace( content,"","" ) else content = replace( content,"","" ) end if content = replace( content,"__APP_PATH__",POP_MVC.appPath ) content = replace( content,"__MVC_DIR__",POP_MVC.mvc_dir ) content = replace( content,"__DATA_PATH__",dataFileName ) if POP_MVC.file_put_contents( fileName,content ) then Response.write "" Response.write "