In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "how to use php require_once", the explanation content in the article is simple and clear, easy to learn and understand, please follow the idea of Xiaobian slowly in-depth, together to study and learn "how to use php require_once"!
In php, the require_once statement is used to reference or include an external php file with the syntax "require_once(filename)" or "require_once 'filename'"; if the file specified by the statement has already been included, it will not be included again.
Operating environment of this tutorial: Windows 7 system, PHP7.1 version, DELL G3 computer
php require_once statement
require_once: Its role is the same as that of require, both reference or contain an external php file
Principle: When the php file containing require_once is executed, the external file specified by require_once will be included, and other code will form a new php file and start execution.
Syntax: "require_once(filename)" or "require_once 'filename'"
Note:
1. When the external included file has errors, it will also run incorrectly and terminate the operation.
When applying the require_once statement, it will first check whether the file to be included has already been included elsewhere in the program, and if so, it will not be included again.
Examples:
a.php
b.php
The result of running b.php is:
Hello
Note: The result is only a Hello output, indicating that the code in a.php has only been referenced once.
Thank you for reading, the above is the content of "how to use php require_once", after learning this article, I believe everyone has a deeper understanding of how to use php require_once, and the specific use needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.