0

我有一个呈现网站的 iframe(如http://google.com)。但是对于重定向的网站(例如http://tinyurl.com/l6llqre),重定向将在我当前浏览器的整个窗口中打开。如何修复它,以便网站在 iframe 内重定向?

这是我的 iframe:

public function renderContent() {
  if ($this->url) {
    return
     <iframe
       src={$this->url}
       width="100%"
       height="500px"
       scrolling="no"
     />;
  } else {
    return <ui:box type="red">{'The website cannot be loaded'}</ui:box>;
  }
}

真正的 php 新手,将不胜感激任何提示!

4

0 回答 0