douna2917 2015-09-14 09:45
浏览 201
已采纳

moodle php页面重定向继续页面重定向时出现

I have a moodle page and from that page I am trying to redirect to another page using redirect as follows:

redirect("page2.php?cId=".$cid);

I got redirect to the other page but while redirecting I am viewing something as follow:

enter image description here

It looks like so messy. I want to avoid this.

Here current page is having moodle header and footer and the page2.php does not have moodle header and footer

How can I avoid this Continue page?

  • 写回答

3条回答 默认 最新

  • dongliao9018 2015-09-14 10:41
    关注

    Make sure Debugging is enabled (set to 'Developer' and display).

    You may see a warning message here, that might explain why the redirect is not working immediately.

    The most likely explanation is that something has been output before redirect is called. Look through your code for any 'echo' or 'print' calls before the redirect is reached.

    If you can't find any 'echo' or 'print' calls, make sure there are no spaces (or any other characters) before the opening '<?php' tags in any of your files, that there are no closing '?>' tags at the end of your files (it is very easy to add unwanted spaces after closing PHP tags) and that there are no unwanted inline HTML sections.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥50 永磁型步进电机PID算法
  • ¥15 sqlite 附加(attach database)加密数据库时,返回26是什么原因呢?
  • ¥88 找成都本地经验丰富懂小程序开发的技术大咖
  • ¥15 如何处理复杂数据表格的除法运算
  • ¥15 如何用stc8h1k08的片子做485数据透传的功能?(关键词-串口)
  • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
  • ¥200 uniapp长期运行卡死问题解决
  • ¥15 latex怎么处理论文引理引用参考文献
  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?