如何隐藏iframe中的URL / SRC?

时间:2012-09-12 13:23:47

标签: php url iframe hide

有没有人知道隐藏iframe的src的聪明方法?

<iframe src=
    "<?php 
      $values = get_post_custom_values("my-custom-field"); 
      echo $values[0]; 
    ?>" 
    width="100%" 
    height="500px" 
    frameborder="0">
</iframe>

1 个答案:

答案 0 :(得分:-1)

正如人们在评论中所说,浏览器需要的内容无法隐藏。

我唯一能想到的就是使用HTML实体:

<iframe src=
    "<?php 
      echo htmlentities($myurl);
    ?>" 
    width="100%" 
    height="500px" 
    frameborder="0">
</iframe>

很抱歉,如果有更好的方式编码到实际的浏览器中,那么它是可能的。这可能是你最接近的。

相关问题