歡迎光臨, 訪客. 請先 登入註冊一個帳號.
四月 26, 2024, 05:11:11 上午
19595 文章 在 3865 主題 由 4580 會員
最新註冊會員: aa123aa1
  列出文章
頁: [1]
1  開發 / 外掛程式 / 那位大大可以帮忙解答1下 这个SESSION 有关的问题 万分感谢 於: 十月 08, 2007, 11:25:38 下午
我做了一个 test.php 放在lifetype 下面和admin.php 一起的,这个test.php主要是用来负责自动产生登陆SESSION 的 现在问题是 我的 SESSION  的确是产生了 但是 只在test.php 里面可以看到 在 admin.php 里看不到 但是我新建立一个TEST1。PHP 也可以看到 请问是怎么回事?我那里设置错了么

test.php
程式碼:
<?
    if (!defined( "PLOG_CLASS_PATH" )) {
        define( "PLOG_CLASS_PATH", "F:\AppServ\www\lifetype/");
    }


    include_once( PLOG_CLASS_PATH."class/bootstrap.php" );
    include_once( PLOG_CLASS_PATH."class/controller/admincontroller.class.php" );
    include_once( PLOG_CLASS_PATH."class/net/http/session/sessionmanager.class.php" );
    include_once( PLOG_CLASS_PATH."class/dao/userinfo.class.php" );
include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
    include_once( PLOG_CLASS_PATH."class/dao/bloginfo.class.php" );
    //include_once( PLOG_CLASS_PATH."class/plugin/pluginmanager.class.php" );
    //include_once( PLOG_CLASS_PATH.'class/template/templatesets/templatesets.class.php' );

include_once( PLOG_CLASS_PATH."class/action/action.class.php" );
    include_once( PLOG_CLASS_PATH."class/view/admin/admindashboardview.class.php" );
    include_once( PLOG_CLASS_PATH."class/view/admin/admindefaultview.class.php" );
    include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
    //include_once( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
    include_once( PLOG_CLASS_PATH."class/net/http/session/sessioninfo.class.php" );
include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
include_once( PLOG_CLASS_PATH."class/misc/version.class.php" );
include_once( PLOG_CLASS_PATH."class/locale/locales.class.php" );
include_once( PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
include_once( PLOG_CLASS_PATH."class/view/admin/adminnewpostview.class.php" );


    ini_set("arg_seperator.output", "&amp;");
    ini_set("magic_quotes_runtime", 0 );
    // initialize the session

    SessionManager::init();

// 產生一個新的 user 物件
$users = new Users();
// 取得 userInfo 物件 (透過正確的 username 與 password)
$userName="test5";
$userPassword="111111";
$userInfo = $users->getUserInfo( $userName, $userPassword );
// 取得使用者的 blog list
$userBlogs = $users->getUsersBlogs( $userInfo->getId(), BLOG_STATUS_ACTIVE );
// 用第一個 blog 來當作 blogID,並取得這個 blog ID 的 blogInfo
$blogInfo = end( $userBlogs );
// 取得 session
//echo "<pre>";

$session = HttpVars::getSession();
$sessionInfo = $session["SessionInfo"];
// 並且把資料寫入session
$sessionInfo->setValue( "userInfo", $userInfo );
$sessionInfo->setValue( "blogInfo", $blogInfo );
$session["SessionInfo"] = $sessionInfo;
HttpVars::setSession( $session );
echo "<pre>";print_R($_SESSION);
?>
2  測試 / LifeType 1.1 測試 / Re: 我想整合全站程序,关于数据结构的问题 於: 十月 07, 2007, 02:38:05 下午
我也想知道 那位大大  知道的可以 说下么 嚎啕大哭 嚎啕大哭
頁: [1]