When is a php include file parsed?

前端 未结 3 1413
误落风尘
误落风尘 2021-01-23 21:22

When is a PHP include file parsed? At startup, or during execution?

My web forms call a single php script. Depending on the arguements passed in the URL, a swit

3条回答
  •  自闭症患者
    2021-01-23 22:03

    Files are included if and when the include statement is reached at runtime. To very succinctly summarise what that means, the following file is never going to be included:

    if (false) {
        include 'foo.php';
    }
    

提交回复
热议问题