Initial commit
[2ch-be.git] / dev-test / include / inbox2.class.php
blob61175832eefbf3b54db9c3205da0e24d1ea9dc0e
1 <?php
2 //error_reporting( E_ALL );
3 //ini_set('display_errors', 1);
4 Class inboxRead{
5 public $strReplaced;
6 public $firstChar;
7 public $secondChar;
8 public $directory;
10 public function __construct(){
14 public function setDirectory($directory){
15 $this->directory = $directory.$this->firstChar."/".$this->secondChar."/".$this->strReplaced."/";
16 return $this->directory;
19 public function setEmail($directory){
20 $this->directory = $directory.$this->firstChar."/".$this->secondChar."/".$this->strReplaced."/";
21 return $this->directory;
24 public function getInbox(){
25 @chdir($this->directory);
26 try{
27 $files = glob("*.dat");
28 if(!$files){
29 throw new Exception("There is no message");
30 }else{
31 return $files;
33 }catch(Exception $e){
34 echo $e->getMessage();
38 public function read(){
39 echo "test";
40 // echo $this->directory;