1
我有过一个源到一个iframe的链接调用的iframe:从另一个窗口
<a href='new.mp4' target='showVideo'></a>
<iframe src='sample.jpg' name='showVideo' ></iframe>
我想要做的是有链接<a>
指向一个PHP文件,将返回新源。这意味着我的PHP文件与我的所在的位置不同:
我想要完成的示例;
sample.html:
<a href='sample.php''></a>
<iframe src='sample.jpg' name='showVideo' ></iframe>
sample.php:
<?php
//Code that will get a variable in MySQL
echo "<a href='".$somePhpVariable."' target='showVideo'></a>";
?>
这可能吗?
将您的'''target'指向框架,并在PHP文件中使用'header(“Location:...”)'将框架重定向到所需的URL。 – Passerby