php - 通过 session_start() 建立新会话后,如何消除虚拟包含语句上的警告消息?
问题描述
问题及说明:
我不太熟悉如何使用虚拟包含正确启动会话,我正在尝试为用户创建欢迎页面,但我一直在我的一个virtual(...)
声明中收到警告。我将在下面列出错误。我确信它不会很难修复,但我似乎无法摆脱它。
代码
<?php session_start(); ?>
<!DOCTYPE html>
<html>
//line below is where I get the error
<?php virtual('../common/headerhw8.html'); ?>
<body>
<?php
echo'Welcome to user welcome page';
if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){
header("location: ../php/login.php");
exit();
}
?>
</body>
</html>
错误
virtual(): A session is active. You cannot change the session module's ini settings at this time
解决方案
推荐阅读
- apache-spark - 在 GCP Dataproc 中,我们可以在集群中使用的最大工作节点数是多少?
- python - 如何有条件地拆分熊猫中的全名字符串列
- java - 如何解决 Java 中的 NullPointerException 错误?
- coq - 由 case_eq 和 Coq 重写导致的抽象/打字错误
- sql - 如何在SQL中选择具有一列条件值的行
- python - 删除列表中的特定列表
- keycloak - 如何在keycloak中的单个资源上添加多个所有者
- filter - 在 powerbi 中使用多个过滤器进行 DAX 查询
- python - Python, linux:使用 wifi Cell 和 Scheme,我如何连接到网络?
- discord - 从不同的文件中获取给定文件的文件夹(JAVASCRIPT)