Ec (2); reference we will talk about two types of variable references: one is File include reference, through the include () or require () function, you can insert the content of a file into the file before the php tutorial file is executed on the server. Except for the way they handle errors, the two functions are the same in other aspects. The include () function generates a warning (but the script continues to execute), while the require () function generates a fatal error (fatalerr script ec (2); script
Let's talk about two types of references: variable references and file include references,
Using the include () or require () function, you can insert the content of a file into the file before the server executes the php tutorial file. Except for the way they handle errors, the two functions are the same in other aspects. The include () function generates a warning (but the script continues to execute), and The require () function generates a fatal error (the execution will be stopped when an error occurs ).
Welcome to my home page
Some text
"Default. php", "about. php", and "contact. php" all reference the "menu. php" file. This is the code in "default. php:
Welcome to my home page
Some text
Php reference (that is, adding & symbol before variables, functions, and objects)
The reference in php means that different names access the same variable content.
The pointer in the C language is different from the pointer in the C language. The pointer in the C language stores the address where the variable content is stored in the memory.
Variable reference
Php reference allows you to use two variables to point to the same content
[Php]
$ A = "abc ";
$ B = & $;
Echo $ a; // output here: abc
Echo $ B; // output here: abc
$ B = "efg ";
Echo $ a; // here, the value of $ a is changed to efg, so efg is output.
Echo $ B; // output efg here
?>
[/Php]
Homepage 1 2 3 last