“Php/keyword require once”的版本间差异
来自菜鸟教程
(Bot commit) |
小 (机器人:添加分类Php基础教程) |
||
第1行: | 第1行: | ||
− | |||
= PHP require_once关键字 = | = PHP require_once关键字 = | ||
第54行: | 第53行: | ||
[[../php_ref_keywords|Keywords PHP关键字]]<br /> | [[../php_ref_keywords|Keywords PHP关键字]]<br /> | ||
+ | |||
+ | [[分类:Php基础教程]] |
2020年11月12日 (四) 08:45的最新版本
PHP require_once关键字
例
Use
require_once
在页面上添加页脚:
<!DOCTYPE html> <html> <body> <h1>Welcome to my home page!</h1> <p>Some text.</p> <p>Some more text.</p> <?php require_once 'footer.php';?> </body> </html>
定义和用法
The
require_once
关键字用于嵌入另一个文件中的PHP代码。如果找不到该文件,则会引发致命错误,并且程序将停止。如果以前已包含该文件,则此语句将不再包含它。
相关页面
The
require
关键词
The
include
关键词
The
include_once
关键词
阅读有关在我们的文件中包含文件的更多信息 PHP包含文件教程
.