Thread Deleted
Printable View
Thread Deleted
Because you have two HTML documents, one inside the other. You need to use an output buffer to extract the contents of the body from the page you include.
How to do it output buffer, sorry can u explain in detail pls...
Make sure you don't have any important scripts in the head, because they'll get stripped.PHP Code:<?php
ob_start();
include("../music/andromeda.php");
$page = ob_get_contents();
ob_end_clean();
$page = explode($page, "body>")[1];
$page = substr($page, 0, strlen($page) - 2);
echo($page);
?>
Thread Deleted
Sorry, you're right.PHP Code:<?php
ob_start();
include("../music/andromeda.php");
$page = ob_get_contents();
ob_end_clean();
$page = explode("body>", $page);
$page = $page[1];
$page = substr($page, 0, strlen($page) - 2);
echo($page);
?>
Thread Deleted
See the post.
Is there any solution to include???
:confused: :confused: :confused:
... what? I just gave you one...
OK... let's try this.Regex would be much more elegant here, but PHP seems to have a problem with character classes I can't quite understand.Code:<?php
ob_start();
include("../music/andromeda.php");
$page = ob_get_contents();
ob_end_clean();
$page = explode("<body", $page);
$page = $page[1];
$page = explode(">", $page);
$page = $page[1];
$page = explode("</body>", $page);
$page = $page[0];
echo($page);
?>
the last code you gave me, shows only a blanc page....:confused: :confused:
What is Regex??