【问题标题】:how can I make a page opening only into the iframe and not if it's called directly?我怎样才能让一个页面只打开到 iframe 中而不是直接调用它?
【发布时间】:2015-05-10 14:50:18
【问题描述】:

list.php 生成的内容只能在index.php 上打开到 iframe 标记中。但是直接调用的时候,应该是打不开的。 我怎样才能得到这个?

其实我已经采用这种方法了:

<iframe title="frame" class="iframe" src="http://www.example.com/list.php?type=a&amp;013acd2b6c1368f">[Your browser doesn%27;t support iframes]</iframe>

效果很好,因此如果在没有参数的情况下调用文件,它会重定向到索引。

但是如果您以这种方式直接调用它http://www.example.com/list.php?type=a&amp;amp;013acd2b6c1368f,则内容会以整页显示。虽然我想要这样,但在 tag 之外,它会重定向到 Index.php

请问有什么办法吗?

【问题讨论】:

    标签: php iframe


    【解决方案1】:

    对不起任何人。

    写完这条消息后,我终于在这里找到了答案,稍加修改后就完美了。 我之前没找到这个帖子。

    Answer to my question

    【讨论】:

      猜你喜欢
      • 2020-10-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多