I think I generate a lot of random numbers. Save all the random numbers. How do you do that?
Reply to discussion (solution)
It's not easy to write a library directly, or to write a document and save it.
It depends on how you generate these random numbers, one-time generation? Or do you generate 1 at a time every once in a while?
There are many ways to save it, the key is to see you these random numbers are what to use, run out on the throw or stay long-term use?
If you throw it out, you can put them in the global array $_session
After the session_destory is done.
For long-term use, you can save them in MySQL or a text document
Dizzy death, this change not simple, directly write the library, or directly write the document to save not write storage. I want to generate some random folder names. The array is then deposited. These are then randomly called in the HTML file. Downstairs is the positive solution.
It depends on how you generate these random numbers, one-time generation? Or do you generate 1 at a time every once in a while?
There are many ways to save it, the key is to see you these random numbers are what to use, run out on the throw or stay long-term use?
If you throw it out, you can put them in the global array $_session
After the session_destory is done.
For long-term use, you can save them in MySQL or text documents thanks for the positive solution
It depends on how you generate these random numbers, one-time generation? Or do you generate 1 at a time every once in a while?
There are many ways to save it, the key is to see you these random numbers are what to use, run out on the throw or stay long-term use?
If you throw it out, you can put them in the global array $_session
After the session_destory is done.
For long-term use, you can save them in MySQL or text documents thanks for the positive solution
I'd be happy if you'd be able to put a knot.
Dizzy death, this change not simple, directly write the library, or directly write the document to save not write storage. I want to generate some random folder names. The array is then deposited. These are then randomly called in the HTML file. Downstairs is the positive solution.
They have so clear ideas, why not do their own thinking to write code to achieve it?
Oh, he doesn't know what he needs.
Dizzy death, this change not simple, directly write the library, or directly write the document to save not write storage. I want to generate some random folder names. The array is then deposited. These are then randomly called in the HTML file. Downstairs is the positive solution.
They have so clear ideas, why not do their own thinking to write code to achieve it?
1. Cache Service Storage with Memcache
2. Use session storage, notice the life cycle, usually in 15-30 minutes
3. Use cookies to store the same attention to the life cycle