PHP include_once包含文件

本文概述

它与包含类似, 但仅包含一次外部文件。首先, 它将检查指定的文件是否已经包括在内。如果不包括该文件, 则仅包括一个外部文件。

例子1

另存为page1.php

PHP的include_once

另存为page2.php

PHP的include_once

输出

PHP的include_once

例子2

更改page1.php中的语句

PHP的include_once

输出

PHP的include_once

在example2中require_once无法正常工作。

来源:

https://www.srcmini02.com/29219.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_38016.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?