问题描述
我想知道如何保存一个简单的列表(< ul>< li>< / li>< / ul>
)服务器端。我从来没有做过这样的事情。我做的是一个localstorage。
Localstorage很容易,因为你可以添加localStorage到你想要的:
I'd like to know how it is possible to save a simple list (<ul><li></li></ul>
) server sided. I never did something like that. What I did is a localstorage.Localstorage is pretty easy tho, as you can just add localStorage to what you want:
$('.myObject').css('color', localStorage.mySavedColor);
并在函数中调用它:
function saveColor() {
localStorage.mySavedColor = true;
}
那么,服务器端存储是否一样?我想这有点复杂吧?
确切地说,我试着在以开始使用。
What you are looking for is server-side scripting, which is vastly different from client-side scripting. Check out W3S tutorial on PHP to get started.
编辑:我建议您选择免费的共享托管或在您的PC上本地构建网络服务器。检查WampServer或XAMPP在本地运行服务器,或google任何免费php mysql webhosting。
I recommend you to pick up a free shared hosting or build a webserver locally on your PC. Check out WampServer or XAMPP for running server locally, or google any free php mysql webhosting.
这篇关于将简单的列表服务器边/差存储到localstorage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!