Problems with the PHP framework CI and laravel

Source: Internet
Author: User
We use the database configuration in the Laravel or CI framework and then take the data out of each controller. This is not with each native PHP single page write a mysql_contact, that is, each page to connect to the database once. The essence is different, that is, the PHP framework can be configured for us to configure a persistent data connection, reduce the database duplicate connection cost per page? Some people say that the frame is also connected to each page once, and does not reduce the number of connections. How often does the connection in the frame and the native single page be the same frequency? In addition to support MySQL read-write separation, support Redis LARAVEL/CI Framework, will not be more than flask,revel support these frameworks later extended multi-PV more potential.

I found imooc.com at a good speed. According to the URL form, this site may be used in what PHP framework to do.
Is it ci2.0? Do you use the Redis cache? Imooc.com/corp/index
With what back-end technology, access is so fluid.
I do ab-c100-n100 imooc.com/corp/index request per time:600 on Linode Tokyo Ubuntu VPS.
For Google execute ab-c100-n100 google.com/request per time:2000 more.
Many websites in China, this command is returned from a few 1200 to three hundred or four hundred.
I also want to use a good PHP framework, Laravel is elegant, is AB test scores of only 30, than CI 210 difference several times.
Excuse me imooc.com website is ci2 PHP frame, in the end how choose, thank you.

Reply content:

We use the database configuration in the Laravel or CI framework and then take the data out of each controller. This is not with each native PHP single page write a mysql_contact, that is, each page to connect to the database once. The essence is different, that is, the PHP framework can be configured for us to configure a persistent data connection, reduce the database duplicate connection cost per page? Some people say that the frame is also connected to each page once, and does not reduce the number of connections. How often does the connection in the frame and the native single page be the same frequency? In addition to support MySQL read-write separation, support Redis LARAVEL/CI Framework, will not be more than flask,revel support these frameworks later extended multi-PV more potential.

I found imooc.com at a good speed. According to the URL form, this site may be used in what PHP framework to do.
Is it ci2.0? Do you use the Redis cache? Imooc.com/corp/index
With what back-end technology, access is so fluid.
I do ab-c100-n100 imooc.com/corp/index request per time:600 on Linode Tokyo Ubuntu VPS.
For Google execute ab-c100-n100 google.com/request per time:2000 more.
Many websites in China, this command is returned from a few 1200 to three hundred or four hundred.
I also want to use a good PHP framework, Laravel is elegant, is AB test scores of only 30, than CI 210 difference several times.
Excuse me imooc.com website is ci2 PHP frame, in the end how choose, thank you.

A simple ab test that can qualitatively frame performance is a bit sloppy.
Even if you want to do AB testing, it is best to test L and C in the same environment.
First of all, it must be admitted that when L load something more than C, it will be slower. In fact, I would like to say that this does not become the primary reason for choosing C.
In more places, either C or L, the whole role may be that the entire character is simply a front-end read rendered to the Web, and the backend is other.
Landlord need not worry about these problems, when the framework itself loading performance problems have become the bottleneck of your project, it is not able to simply rely on the framework to solve.
No need to worry, choose a good framework although you can start the project. Unless you consider YAF, Phalcon, or Swoole, the rest of the frameworks are considered to be performance-like.

Read the fucking code.

It's not a blow, I just think you don't know what you're asking, and the most urgent thing you can do now is to put away these messy speculations and honestly see the realization of CI and laravel, Starting from index.php, a line of code to see, encountered not understand the function and the wording of the multi-degree Niang manual, degrees Niang did not help you solve the attempt to write some of the problem against the scene of the experimental code.

The code is not read, even if others patiently tell you what you can, you understand is wrong, you from various kinds of blog tools, various kinds of books to turn to other people to explain the knowledge gained is biased.

Only the code is right.

  • 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.