<?php
ob_start();
echo "Hello";
$str = ob_get_contents();
ob_end_clean();//echo $str;
$contentArr=array('c'=>($str));
$body=json_encode($contentArr);
?>
<!DOCTYPE html>
<script>
var htmlcode=<?php echo $body;?>;
document.write(htmlcode.c);
</script>
# 排除UC游览器
<?php
if(isset($_SERVER['HTTP_USER_AGENT']) && !preg_match('~UCBrowser~i',$_SERVER['HTTP_USER_AGENT']) ){
$str = ob_get_contents();
ob_end_clean();//echo $str;
$contentArr=array('c'=>($str));
$body=json_encode($contentArr);
?>
<!DOCTYPE html>
<script>
	var htmlcode=<?php echo $body;?>;
	document.write(htmlcode.c);
</script>


签名:这个人很懒,什么也没有留下!
最新回复 (0)
返回