Is it allowed for one to do:
main.php:
//some code....
include "main.php";
//some more code....
Wouldn’t this cause issues?
Does PHP allow for this to occur? and if it does, what could a reason be for doing this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, this is possible, but not a good idea or good design.
If your include is unconditional (i.e. not guarded by an
ifstatement), php will eventually terminate because of memory or CPU time restrictions.