Home > Backend Development > PHP Tutorial > PHP学习(函数)

PHP学习(函数)

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-23 14:33:10
Original
923 people have browsed it

像Delphi中的Uses和C/C++等中的include一样,PHP中有require和include来表示引用单元.

如果在一个php文件中引用了一个单元,比如:

require(“test.php”);

test.php是这样定义的:

echo “hello,引用了test.php”;

function test($var)

{

echo $var ;

}

?>

则test.php中的

echo “hello,引用了test.php”;

将被直接显示,而函数test($var)则可以在引用的单元中调用.

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template