Will including unnecessary php files slow down website?

前端 未结 9 1878
醉话见心
醉话见心 2020-12-20 15:23

The question might prompt some people to say a definitive YES or NO almost immediately, but please read on...

I have a simple website where there are 30 php pages (e

9条回答
  •  猫巷女王i
    2020-12-20 15:28

    You should benchmark. Time the execution of the same page with different includes. But I guess it won't make much difference with 30 files.

    But you can save yourself the time and just enable APC in the php.ini (it is a PECL extension, so you need to install it). It will cache the parsed content of your files, which will speed things up significantly.

    BTW: There is nothing wrong with laziness, it's even a virtue ;)

提交回复
热议问题