在 PHP 中的标题之前运行脚本消息

问题描述

我正在尝试在 PHP 破坏会话之前显示此脚本消息,尽管我正在努力理解如何使其工作。

if($query_run)
{
    echo '<script type="text/javascript"> alert("Account Deleted") </script>'; 
    // Unset all of the session variables.
    $_SESSION = array();
    // Destroy the session
    session_destroy();
    header('Location: index.PHP');
}

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)