Home > Backend Development > PHP Tutorial > 使用文件包含_PHP

使用文件包含_PHP

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 12:30:19
Original
881 people have browsed it




使用文件包含



 /*
 ** 取得月份名称数组
 */
 include("40-2.php");  //这里包含文件
 //print("这里时被包含进来的");
 echo("Month 5 is " . $monthName[5] . "
\n");
 echo("Month Aug is " . $monthName["Aug"] . "
\n");
 print("Month June is " . $monthName["June"] . "
\n");
 MyCounter(999)//这里调用包含文件中的函数
?>



function MyCounter($counter) {//一个简单的函数
 print("


");
 print($counter);//打印传入的参数
 print("
");
}
?>



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