Will php be nested?

Source: Internet
Author: User
Can php be nested? If I have two. php files, one of which is & lt ;? Phprequire_once ('login. php ');? & Gt; the other login. php file is & lt ;? Phpecho 'helloworld ';? & Gt; in this way, the code in the first. php file is actually two layers. can php be nested?
If I have two. php files, one of which is
Require_once ('login. php ');
?>
In another login. php file
Echo 'hello world ';
?>
In this way, the code in the first PHP file is actually two layers. Is there a problem with this stuff?

------ Solution --------------------
This will not cause problems, and it is necessary to do so!

The actual action of require is
Generated?>
Load files
Generate
------ Solution --------------------
It's okay ..
------ Solution --------------------
Require_once ('login. php ');
?>
In another login. php file
Echo 'hello world ';
?>

==>
Require_once ('login. php'); his role is to put the login. php content (of course, there is no such content ). ) Are written to the current php file, and then executed together.

No problems.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.