Discover difference between include and define, include the articles, news, trends, analysis and practical advice about difference between include and define on alibabacloud.com
The difference between #define, const, typedef#define is not defining variables, it's just for text substitution.For example:#define PI 3.1415926float Angel;angel=30*pi/180;Then, when the program is compiled, the compiler will first "#define PI 3.141
: This article mainly introduces the differences between require, include, require_once and include_once. For more information about PHP tutorials, see. 1. require () statement
The require () statement is used to replace the specified file with the
To use a function defined in a file in a PHP script, you need to use the
include (), include_once (), require (), and require_once (), a function library file is loaded into the script program. In the previous section we talked about how to use a
About the difference between Require,require_once,include and include_once, Requireonceinclude
First, the definition
Require,require_once,include,include_once are all PHP keywords, which means that they are actually PHP statements, not functions,
Difference between typedef and define
The following code is used to describe
Typedef char * typedef_char;# Define define_char char * // No semicolon here
Void main (INT argc, char * argv []){Char s [] = "ASDF ";Const typedef_char P = s; // char *
Similarities and differences between require (), include (), require_once () and include_once. Require () and include () have many similarities and differences. Understanding their differences is very important, otherwise it is easy to make mistakes.
The use of require is as follows require("MyRequireFile.php"); . This function is usually placed at the front of the PHP program, and before the PHP program executes, it is read into the file specified by require to make it a part of the PHP program'
1.include: The specified file will be read into and executed inside the program.The program code in the file being imported is executed, and these programs are executed with the same variable range (variable scope) as the source file where the call
Go to the script house http://www.jb51.net/article/22467.htmThe use of require is as follows require("MyRequireFile.php"); . This function is usually placed at the front of the PHP program, and before the PHP program executes, it is read into the
The use of require is as follows require("MyRequireFile.php"); . This function is usually placed at the front of the PHP program, and before the PHP program executes, it is read into the file specified by require to make it a part of the PHP program'
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.