我创建了一个python脚本来管理服务器上的多租户系统。目标是通过python中的同一脚本注销用户会话,执行如下PHP脚本:
注销_用户.php
<?php
session_start();
session_unset();
session_destroy();
?>
使用以下Python代码:
import subprocess
command = "php /var/www/tenant/log_out_users.php"
subprocess.call(command, shell=True)
脚本运行正常,但会话未被破坏。如果我从CLI调用php文件,进入tenant文件夹并运行命令,它甚至不起作用
php log_out_users.php
有什么提示吗?你知道吗
我通过以this的方式拒绝用户通过.htaccess访问来解决这个问题。你知道吗
相关问题 更多 >
编程相关推荐