我真的很难让我的应用程序在用户点击链接时打开pdf.
到目前为止,锚标记重定向到一个页面,该页面发送以下标题:
$filename='./pdf/jobs/pdffile.pdf;
$url_download = BASE_URL . RELATIVE_PATH . $filename;
header("Content-type:application/pdf");
header("Content-Disposition:inline;filename='$filename");
readfile("downloaded.pdf");
这似乎不管用,过go 有没有人成功解决过这个问题?