私たちはウェブシットを開発しています。ボタンがあります。ボタン アクションでは、PDF ファイルのダウンロードを配置しました。正常に動作しています。しかし、Web サイトから PDF ファイルをダウンロードするにはどうすればよいですか。
このようにしてみましたが、得られません。
<?php
//$Down=$_GET['Down'];
$a="hello";
$i=0;
?>
<script type="text/javascript">
var i=0;
function submitForm()
{
<?php
$i = @file_get_contents('count.txt'); // read the hit count from file
echo $i; // display the hit count
$i++; // increment the hit count by 1
@file_put_contents('count.txt', $i); // store the new hit count
?>
}
</script>
<html>
<head>
</head>
<body>
<input type="button" onclick="submitForm()" value="submit 1" />
</body>
</html>
何もありません。初心者PHP
です。ご案内ください。