“Content-Type:text/plain” forces to download the file

三世轮回 提交于 2019-12-05 04:51:15

I cannot reproduce this with this script:

<?php

  header('Content-Type:text/plain; charset=ISO-8859-15');
  echo "This is some text";

However, I can reproduce it with this:

<?php

  header('Content-Type:text/plain; charset=ISO-8859-15');
  echo "\x00This is some text";

Make sure that your content actually is plain ASCII text...

For me this works:

header('Content-Type:text/javascript;');
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!