我想将 JavaScript 变量值保存在文件中。
例如,
<script>
var ref = document.referrer;
</script>
我想使用 PHP 将变量 ref 值保存在文本文件中。
<?php
$file = fopen("ref.txt", "a+") or die("Unable to open file!");
fwrite($file, ref);
fclose($file);
?>
我该怎么做?
犯罪嫌疑人X
相关分类