I am trying to embed a simple php file in an iframe, but it is not working. A post suggests, this should be easy.
What I add into my Grav page:
<iframe id="test_iframe" title="test" src="test.php" width="600" height="600"></iframe>
However, this does not work. I get the Error 404. Interestingly, in the iframe, I can see the Grav icon and the menu of my website, something I would not expect or need inside the iframe.
When I replace the php reference with html:
<iframe id="test_iframe" title="test" src="test.html" width="600" height="600"></iframe>
the page shows up.
This is the content of test.html
:
<html>
<head></head>
<body>
This is a HTML page inside IFRAME.
</body>
</html>
This is the content of test.php
:
<?php
echo <<<EOL
<html>
<head></head>
<body>
This is a PHP page inside IFRAME.
</body>
</html>
EOL;
?>
Both the test.html
and test.php
reside in the page folder (01.home).
I am using Grav v1.7.35.
(My end goal is to reference in an iframe a locally stored map with tiles, i.e. a page referencing images from a subfolder.)