if(!function_exists('read_pdf')) {
  function read_pdf($file) {
    if(strtolower(substr(strrchr($file,'.'),1) != 'pdf')) {
	  echo '文件格式不对';
	  return;
	}
	if(!file_exists($file)) {
	  echo '文件不存在';
	  return;
	}
	header('Content-type: application/pdf');
	header('filename='.$file);
	readfile($file);
  }
}
read_pdf("englishi.pdf");

  

相关文章:

  • 2021-06-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-06
  • 2022-03-08
猜你喜欢
  • 2021-12-03
  • 2022-12-23
  • 2021-05-19
  • 2022-12-23
  • 2022-02-08
  • 2021-12-05
  • 2021-12-10
相关资源
相似解决方案