3
我有问题,我的PHP代码:PHP文件下载与头
header('Content-Disposition: attachment; filename="config.yml"');
header('Content-Type: text/plain');
header('Content-Length: '.strlen($file));
readfile($file);
文件下载好,但页面会立即关闭。 像下载将开始,页面将关闭。但是我在页面中也有一些其他代码,比如html。 下载后我不想关闭页面。 你能给我一些建议吗?因为我不知道,哪里会出错。