【发布时间】:2011-02-22 17:48:45
【问题描述】:
我的主页 (index.php) 中有一个 iframe (iframe.php)。我想在 iframe 中回显主页的 URL。我知道如何回显任何页面的 URL,但当它在 iframe 内时不知道。当我尝试这个时,它只回显 iframe 的 URL,而不是主页的 URL。这听起来很简单,但无法弄清楚。
原因:我选择 php 的原因以及我尝试这样做的原因是,我需要验证访问此页面的 URL……不希望 iframe除非用户在 index.php 中才能访问,如果用户不在主页的 iframe 中,则拒绝用户访问。
【问题讨论】:
标签: php javascript iframe