When is a php include file parsed?

前端 未结 3 1374
误落风尘
误落风尘 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 21:48

    File included with include statement are parsed during exection. When your php code hits a include statement it will start parsing the file to see what is in there. From w3schools

    The include (or require) statement takes all the text/code/markup that exists in the specified file and copies it into the file that uses the include statement.

    There is other questions with a similar topic:

    In PHP, how does include() exactly work?

提交回复
热议问题