且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是否可以停止包含php文件?

更新时间:2023-09-19 23:20:10

取代 break ,使用 return


返回



如果从全局范围调用,则结束当前脚本文件的执行。如果当前脚本文件为 include() ed或 require() ed,然后将控制权传递回调用文件。

return

If called from the global scope, then execution of the current script file is ended. If the current script file was include()ed or require()ed, then control is passed back to the calling file.