gpt4 book ai didi

php - 如果不是从包含运行,则运行代码

转载 作者:行者123 更新时间:2023-12-02 07:36:17 26 4
gpt4 key购买 nike

<分区>

page1.php:

include 'page2.php';
echo $info;

page2.php:

$info = "some info";
if(!included){
echo 'Why are you on this page?';
}

if(!included){ 的目标是确定 page2.php 是否通过 page1 中的 include 加载。 php,或者如果用户直接请求页面。文档中没有返回此类值的函数。如何创建这样的函数?

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com