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

PHP学习(函数)

WBOY
WBOYOriginal
2016-06-23 14:33:10887browse

像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)则可以在引用的单元中调用.

Statement:
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
Previous article:php调试环境Next article:PHP的来龙去脉