-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
求分析include,require,include_once...这些引入文件的语句 #1
Comments
不要使用once,尽量include。鸟哥有篇文章说的这个,具体BLOG |
我也尽量不用once的,但现在不是讨论用不用讨论的问题,是讨论两个函数之间的区别问题,我发现很多网上的文章存在误解或说明不详细,造成对读者的误导,所以希望能分析一下源码有个铁证,以防更多人被误导 |
require与include的差别:错误信息的显示级别zend_bailout(); 对于once类型的, php每次引入会查全局表一次确认文件是否被引入过; |
http://www.kkh86.com/it/php-base/guide-base2-include.html 这是我调试后得出的结论文章,虽不知底层是不是这样,调出来的效果就是这样了,你有空的话麻烦帮忙鉴定一下哈 说报错级别问题确实是个区别,但目前只能试出文件不存在时的错误,如果被引入的文件代码里有错误就一模一样了(可能处理的范围本身就不一样,两者可能无法一概而论,所以估计官方说的错误级别是指处理参数时的错误级别,而不是参数正确,文件存在,引入文件后的错误级别吧) |
@kk8686 多谢建议,这两天抽时间研究一下。 |
发现网上有不少互相采集内容一样的相同文章,如这篇 :http://www.jb51.net/article/22467.htm
跟着做却发现require和include有的区别并不是那样,或者他说的并不是那么细致,求分析求真相谢谢
The text was updated successfully, but these errors were encountered: