Php: // how to use memory-php Tutorial

Source: Internet
Author: User
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 );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.