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

使用文件包含_PHP

WBOY
WBOYOriginal
2016-06-01 12:30:19854browse




使用文件包含



 /*
 ** 取得月份名称数组
 */
 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("
");
}
?>



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