PHP & 本地存储;
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3855337/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
PHP & localStorage;
提问by Felix Kling
I've searched around for use of localStorage in PHP, as I need to get localStorage data as a $var, in PHP and do stuff in PHP with it. Is this possible?
我已经在 PHP 中搜索了 localStorage 的使用,因为我需要在 PHP 中将 localStorage 数据作为 $var 获取并用它在 PHP 中执行操作。这可能吗?
P.S. If anybody knows any good HTML5 resources, other than what can be easily found on Google, please share.
PS 如果有人知道任何好的 HTML5 资源,除了可以在 Google 上轻松找到的资源,请分享。
回答by Felix Kling
localStorage
is something that is kept on the client side. There is no data transmitted to the server side.
localStorage
是保留在客户端的东西。没有数据传输到服务器端。
You can only get the data with JavaScript and you can send it to the server side with Ajax.
你只能用 JavaScript 获取数据,然后你可以用 Ajax 将它发送到服务器端。