我使用javascript:
将我的deviceID保存在浏览器的本地存储中<button onclick="store()" type="submit">Zoeken</button>
<script type="text/javascript">
//Store deviceID in local storage on button click
function store(){
var inputDeviceID= document.getElementById("deviceID");
localStorage.setItem("deviceID", inputDeviceID.value);
}
</script>
现在我想用php查看是否有任何数据存储到本地存储中,如果打开页面时存储了数据,请转到该URL路径,.. / sigfoxapp /?deviceID = 1B2E4F
$FOLDER = '../sigfoxdata/';
$dir = scandir($FOLDER);
$file = $_GET['deviceID'].'.json' ?: 'DEMO.json';
$fileUrl = $FOLDER.$file;