I have a simple php file having only:
<?php
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header("content-type:application/javascript");
echo "var md = 0 ";
In my html file I am calling the php file in iframe:
<iframe src="../API/index.php?i=MTQ4MDkyMDY1Mg==&d" width="100" height="100"></iframe>
While using the link in script tag its working but when I try to use it in iframe I'm getting the mime application/javascript error.
An Iframe can only accept html document.
You can do the js inside your html.
<iframe src="../API/index.php?i=MTQ4MDkyMDY1Mg==&d"></iframe>
and inside the php, remove all headers and do...
echo "<script type='text/javascript'>var md = 0; </script>";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With