malformed header from script. Bad header=1: index.php

后端 未结 4 982
醉梦人生
醉梦人生 2021-01-18 20:22

I have a website which is a few years old now, it basically offers downloads.

Anyway since moving server people can not download files because its now giving a error

4条回答
  •  暖寄归人
    2021-01-18 21:08

    This problem is related to some output which appears before you send headers.

    It is a common problem that some characters like spaces, new lines or even UTF-8 malformed BOM (Byte order mark) are placed before starting php tag.

    You need to be sure that absolute nothing is echo-ed before sending headers and need to check that for all included files in your script.

    In addition, ob_clean(); and flush(); functions are not needed in you code.

提交回复
热议问题