假设该页为 1.php
另一页为2.php2.php中<?
ob_start();
include( "1.php");
$html = ob_get_contents();
ob_end_clean();
echo $html; //$html就是结果
?>
另一种方法
<?
$html = file_get_contents( "http://www.xxx.com/1.php" );
echo $html;
?>
另一页为2.php2.php中<?
ob_start();
include( "1.php");
$html = ob_get_contents();
ob_end_clean();
echo $html; //$html就是结果
?>
另一种方法
<?
$html = file_get_contents( "http://www.xxx.com/1.php" );
echo $html;
?>
ob_start();
$contents = ob_get_contents();
eval("?>$contents<?");
ob_end_clean();
echo $contents;
?>