Php: How does memory use my intention to load controller files more efficiently? after all, the read memory is much faster than the read disk. I checked that include may support protocols such as php: memory, but I didn't know how to use it in the manual, and I didn't google it either. I tried to use php: memorytest and php: memory: test, but they are all wrong ------ solution-php: // how to use memory
My intention is to load the controller file more efficiently. after all, the read memory is much faster than the read disk.
I checked that include may support protocols such as php: // memory, but I didn't know how to use it in the manual, and I didn't google it either.
I tried to use php: // memory/test and php: // memory: test, but they are all wrong.
------ Solution --------------------
I have never used it. come and study together.
------ Solution --------------------
I also hold a place.
------ Solution --------------------
What is your requirement for eAccelerator?
Memory is very fast. I tried memcache to load 20 files, eval, and the average total time consumption is faster than that of disk reading.
Example of reading
PHP code
$ Fp = fopen ("php: // memory", 'R + '); fputs ($ fp, "hello world! \ N "); rewind ($ fp); while (! Feof ($ fp) {echo fread ($ fp, 1024);} fclose ($ fp );
------ Solution --------------------
Try this way
$ Fp = fopen ('php: // memory ', 'R + ');
Fputs ($ fp, 'ABCD ');
Rewind ($ fp );
Echo fgets ($ fp );