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

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

05-26 00:57