我正在开发视频点播网站。下载选项与内容标题和读取文件一起提供。我遇到了一个问题,我只能在下一个文件完成后才能查看或下载其他内容。 我目前的读取文件代码Php执行暂停直到文件被下载
session_start();
header("Content-Type: application/force-download");
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header('Content-Type: video/mp4');
header('Content-Disposition: attachment; filename='.$_SESSION['file']);
//set_time_limit(0);
readfile($_SESSION['file']);
exit();
可能是什么问题?
我有流媒体内容没有任何经验,但它可能是更好地使用JS去做这个。这是因为带AJAX的JS可以改变一些事情,这是PHP不能做的事 – SuperDJ
您正在体验所谓的会话锁定。 – MonkeyZeus
@MonkeyZeus是的,现在我明白了,谢谢 – coderSree