What's quicker; including another file or querying a MySQL database in PHP?

后端 未结 12 1683
闹比i
闹比i 2021-01-12 04:29

In PHP, which is quicker; using include(\'somefile.php\') or querying a MySQL database with a simple SELECT query to get the same information?

12条回答
  •  醉梦人生
    2021-01-12 05:21

    I exactly don't know, but in my opinio using MySQL, even if can be slower, sould be used if the content is dynamic. But I'm pretty sure it is faster, for big contents, using include.

提交回复
热议问题