我有一个字符串,它回显到当前文档中,但是,我只想在<body>
.
$string = '
<html>
<head>
<title>Title</title>
</head>
<body>
<!-- leave any tag within the body -->
</body>
</html>
';
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Title</title>
</head>
<body>
<?php echo $string; // new valid content ?>
<!-- more content -->
</body>
</html>