Home > Backend Development > PHP Tutorial > Simple example of php include() calling file_PHP tutorial

Simple example of php include() calling file_PHP tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-13 10:54:24
Original
1347 people have browsed it

include 'include.php tutorial'; //Reference the include.php file

echo a();

//result bb
?>

include.php file is as follows

//Create include.php for other files to call
function a() //Define function a
{
b(); //Call function b
in function a }
function b() //Define function b
{
c(); //Call function c
in function b }
function c() //Define function c
{
echo('bb'); //Output a php backtrace
}
a(); //Use function a
?>
Other tips:

When using the require() statement to call a file, if the file is not found, the require() statement will output an error message and immediately terminate the script processing. The include() statement will output a warning if the file is not found. Will terminate script processing

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632340.htmlTechArticleinclude 'include.php tutorial';//Reference the include.php file echo a(); //Result bb ?The include.php file is as follows?php //Create include.php for other files to call function a()//Define function a {...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template