class sessStaticDevice extends sessStaticID {
var $startedPath;
var $BaseClass = "baseDbsql";
var $BaseObject;
function sessStaticDevice() {
$this->sessStaticID();
$this->Path = "Sessioner";
}
function _sessStaticDevice() {
$this->_sessStaticID();
}
function prvStartedDevice($path) {
$this->startedPath = $path;
}
function prvInitBase() {
if (!is_object($this->BaseObject)) {
$base = $this->BaseClass;
$this->BaseObject = new $base;
}
}
function prvGc() {
$this->BaseObject->query("SELECT id FROM ".$this->startedPath." WHERE lastused < ".(time() - $this->Maxlifetime));
while ($record=$this->BaseObject->next_record())
$id_arr[] = $record["id"];
if (is_array($id_arr)) {
reset($id_arr);
while (list(,$id)=each($id_arr)) {
$this->prvOnEnd();
$this->BaseObject->query("DELETE FROM ".$this->startedPath." WHERE id='$id'");
}
}
list($rows,$fields) = $this->BaseObject->query("SELECT id FROM ".$this->startedPath);
return $rows;
}
function prvRead() {
$this->BaseObject->query("SELECT value, lastused FROM ".$this->startedPath." WHERE id='".$this->ID."'");
if ($record=$this->BaseObject->next_record())
return stripslashes($record["value"]);
return false;
}
function prvWrite($value) {
$this->BaseObject->query("REPLACE INTO ".$this->startedPath." (id, value, lastused) "."VALUES ('".$this->ID."', '".addslashes($value)."', ".time().")");
}
function prvDestroyDevice() {
$this->BaseObject->query("DELETE FROM ".$this->startedPath." WHERE id='".$this->ID."'");
}
}CREATE TABLE Sessioner ( id varchar(32) not null PRIMARY KEY, value text not null, lastused int(8) );
function session_start() {
//
// 데이터베이스를 이용하기 위해 새로 추가된 부분
//
$GLOBALS["sessStatic"]->prvInitBase();
return $GLOBALS["sessStatic"]->prvStart();
} <?php
require("./minidb/class.mysql.php");
require("./sessioner/sessbase.php");
$base = new baseDbsql("호스트명","사용자ID","비밀번호","디비명");
session_start();
......
?>These mulberry outlet shop have great bags collections. You may like mulberry satchel bags. Buy them from mulberry outlet uk stores.
| 번호 | 제목 | 닉네임 | 조회 | 등록일 | 최근 수정일 | 상태 |
|---|---|---|---|---|---|---|
| 6 | 1.개요 [1] | joy24 |
193 | 2000-12-28 | 2012-05-08 09:57 | 완료 |
| 5 | 2.C++ [1] | joy24 |
344 | 2000-12-28 | 2012-05-08 09:57 | 완료 |
| 4 | 3.자바 [1] | joy24 |
224 | 2000-12-28 | 2012-05-08 09:58 | 완료 |
| 3 | 4.PHP [4] | joy24 |
271 | 2000-12-28 | 2012-05-08 09:54 | 완료 |
| 2 | 5.세셔너 분석 [1] | joy24 |
190 | 2000-12-28 | 2012-05-08 09:58 | 완료 |
![]() |
6.세셔너 확장 [1] | joy24 |
183 | 2000-12-28 | 2012-05-08 09:58 | 완료 |
아이디가 없으신 분은
회원가입 후 이용하실 수 있습니다.
