HTMLをファイルに書き込んでファイルダイアログボックスを開こうとしています
ユーザーが保存するため
しかし、何も起こらず、エラーはありません
何か案は ?
ありがとうございました
これは私のコードです
<?php
$css=$_POST['css'];
$html=$_POST['html'];
$handle = fopen("file.txt", "w");
fwrite($handle, $html);
fclose($handle);
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($handle));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($handle));
ob_clean();
flush();
readfile($handle);
exit;
?>