你没必要通过调用logon.php来取session和$user,你可以直接
在index.php 文件中
session_start();就行了