dongxin8709 2013-05-07 18:19
浏览 34

在Internet Explorer上将URL参数传递给Iframe

I'm trying to pass some parameters to an Iframe and it works fine in all browsers, except IE.

I couldn't find any other solution for what I'm trying to do, but maybe IE doesn't accept parameters to be sent to an iframe?

This is what I have:

 <iframe src="https://portal.maxistore.com.br/dologin.php?
 email=<?php echo urlencode($user_info->user_login) ?>&timestamp=<?php echo urlencode($timestamp) ?>&hash=<?php echo $hash ?>&goto=<?php echo urlencode($goto_invoices) ?>" name="iframeTarget" id="iframeTarget" width="100%" height="1200px"></iframe>    

Thank you.

  • 写回答

1条回答 默认 最新

  • dsbx40787736 2013-05-07 18:37
    关注

    My answer has nothing to do with IE compatibility directly... I just wanted to point out a much more efficient way to build urls. Although, it may be beneficial to do it the proper way and eliminate the margin for error when building your urls.

    With the use of http_build_query and sprintf you can build dynamic encoded urls with a single function versus all this interdom php code. Check it out:

    Example

    $Data = [
        'timestamp' => time(),
        'id' => 64,
        'email' => 'bobbyryan@aol.com',
    ];
    
    $url = http_build_query($Data);
    
    echo sprintf("http://www.example.com/?%s", $url);
    

    Results in the following URL

    http://www.example.com/?timestamp=1367951475&id=64&email=bobbyryan%40aol.com
    
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器