//替换php代码
function RepPhpAspJspcode($string){ global $public_r; if(!$public_r[candocode]){ //$string=str_replace("<?xml","[!--ecms.xml--]",$string); $string=str_replace("<\\","<\\",$string); $string=str_replace("\\>","\\>",$string); $string=str_replace("<?","<?",$string); $string=str_replace("<%","<%",$string); if(@stristr($string,' language')) { $string=preg_replace(array('!<script!i','!</script>!i'),array('<script','</script>'),$string); } //$string=str_replace("[!--ecms.xml--]","<?xml",$string); } return $string;}//替换php代码
function RepPhpAspJspcodeText($string){ //$string=str_replace("<?xml","[!--ecms.xml--]",$string); $string=str_replace("<\\","<\\",$string); $string=str_replace("\\>","\\>",$string); $string=str_replace("<?","<?",$string); $string=str_replace("<%","<%",$string); if(@stristr($string,' language')) { $string=preg_replace(array('!<script!i','!</script>!i'),array('<script','</script>'),$string); } //$string=str_replace("[!--ecms.xml--]","<?xml",$string); $string=str_replace("<!--code.start-->","<!--code.start-->",$string); $string=str_replace("<!--code.end-->","<!--code.end-->",$string); return $string;}