私はPCやノートパソコンからダウンロードしたときに以下の機能を使用してpdfファイルをダウンロードしていますが、ipadを使用してダウンロードリンクをクリックすると、ファイルをダウンロードできません。ipadを使用してpdfをダウンロードできない
マイダウンロード機能は
public function download() {
$download_path = $_SERVER['DOCUMENT_ROOT'] . "/import";
$filename = $_GET['file'];
$file = str_replace("..", "", $filename);
$file = "$download_path/$file";
if (!file_exists($file))
die("Sorry, the file doesn't seem to exist.");
$type = filetype($file);
header("Content-type: $type");
header("Content-Disposition: attachment;filename=$filename");
header('Pragma: no-cache');
header('Expires: 0');
readfile($file);
}
このエラーについての任意のアイデアですか?
文字セットが –
と一致することを確認してください。私はutf-8を使用しています –
あなたのiPadが見ていることを確認してください。 –