//pdf 在線預覽
public function pagePdf(){
$file = '/home/wangshunan/www/app/seek/Sphinx.pdf';
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);
}
pdf課件 在線預覽
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.