here is what i want to do
-
i use codeigniter directory_map() function to map a folder save it as $map;
$map = directory_map($this->rootdir.$this->session->userdata('user_name')); -
then i encode the $map and echo it out
echo $dir = json_encode($map); -
what i want is save the $dir somehow.so when user open one of the folder i can use js to get the folder’s content from the saved $dir json file, instead of communicate to server.if this make sense then how can i save the $dir json file or how to get it in the js file.
is there a better way to do that?
I personally use the method mentioned here, which is basically along the following outline:
Update: (I think I confused you a bit) The following is Javascript code
Note: for
hash(), you can use any hashing algorithm out there, you don’t really need a cryptography-level hash, just something to create a basic signature. I use the Javascript implementation of Java’shashCode()