Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
据我了解, $fileToDownload 包含 PDF 的二进制数据,所以你应该只是
echo $fileToDownload;
并改变:
header('Content-Length: '. strlen($fileToDownload));