在我的mamp(苹果)上测试该软件时,它可以工作,但在xampp(w10)上却不能,它根本不会加载pdf文件
<?php
$remote_pdf = 'http://pdflink.com:29083/xampp/test.pdf';
$remote_file_name = end(explode('/', $remote_pdf));
header('Content-type: application/pdf');
header('Content-Disposition: inline; filename="'. $remote_file_name
.'"');
header('Content-Transfer-Encoding: binary');
readfile($remote_pdf);
?>
我已经检查过,该文件确实存在,并且可以通过url访问,但是由于某种原因,readfile在xampp安装中不起作用。其最新的Windows 10与php7
我已经在这里待了几个小时,找不到解决方案。出于安全原因,我需要屏蔽pdf文件的名称。