예제 #1
0
 function char($file = false)
 {
     if (!$file) {
         return 0;
     }
     $this->Number = basename($file, ".dat");
     $this->file = $file;
     $this->fp = FileLock($file);
     $data = ParseFileFP($this->fp);
     $this->SetCharData($data);
 }
예제 #2
0
	function LoadData($file) {
		if(!file_exists($file))
			return false;

		$this->file	= $file;
		$this->fp	= FileLock($this->file);

		$this->UnionNo	= substr(basename($file),0,4);
		$data	= ParseFileFP($this->fp);
		$this->SetCharData($data);
		return true;
	}
예제 #3
0
 function LoadUserItem()
 {
     // 2重に読むのを防止。
     if (isset($this->item)) {
         return false;
     }
     $file = USER . $this->id . "/" . ITEM;
     if (file_exists($file)) {
         $this->fp_item = FileLock($file);
         $this->item = ParseFileFP($this->fp_item);
         if ($this->item === false) {
             $this->item = array();
         }
     } else {
         $this->item = array();
     }
 }