foxc Posted January 6, 2008 Report Share Posted January 6, 2008 (edited) Nopirku šo chatboxu. kad uzlieku uz servera un eju ieksā uzmetas errors: /php/filestorage.class.php, line 14 filestorage.class.php <? class FileStorage { function FileStorage($path, $shoutLog = false) { $this->shoutLog = $shoutLog; $folder = 'logs'; if (!is_dir($folder))$folder = '../' . $folder; $this->path = $folder . '/' . $path . '.txt'; } function open($lock = false) { $this->handle = fopen($this->path, 'a+'); if ($lock) { $this->lock(); return $this->load(); } } function close(&$array) { if (isset($array)) $this->save($array); $this->unlock(); fclose($this->handle); unset($this->handle); } function load() { if (($contents = $this->read($this->path)) == null) return $this->resetArray(); return unserialize($contents); } function save(&$array, $unlock = true) { $contents = serialize($array); $this->write($contents); if ($unlock) $this->unlock(); } function unlock() { if (isset($this->handle)) flock($this->handle, LOCK_UN); } function lock() { if (isset($this->handle)) flock($this->handle, LOCK_EX); } function read() { fseek($this->handle, 0); //return stream_get_contents($this->handle); return file_get_contents($this->path); } function write($contents) { ftruncate($this->handle, 0); fwrite($this->handle, $contents); } function resetArray() { if ($this->shoutLog) $default = array( 'info' => array( 'latestTimestamp' => -1 ), 'posts' => array() ); else $default = array(); $this->save($default, false); return $default; } } ?> $this->handle = fopen($this->path, 'a+'); kluudas rindinja Lūdzu palīdzat . Edited January 6, 2008 by foxc Link to comment Share on other sites More sharing options...
andrisp Posted January 6, 2008 Report Share Posted January 6, 2008 (edited) Klau, ja jau tu nopirki, tad par šādām lietām tev nebūtu jāvēršas pie tā kā nopirki ? Kas man patīk - kļūdas paziņojumu iekopējis tikai daļēju. Tu tiešām domā, ka mums patīk minēt, kas citiem par problēmām ? Edited January 6, 2008 by andrisp Link to comment Share on other sites More sharing options...
foxc Posted January 6, 2008 Author Report Share Posted January 6, 2008 nu kaaa ir sitaaaa open(logs/yshout.prefs.txt): failed to open stream: Permission denied. File: /home2/brake.eclub.lv/public_html/php/filestorage.class.php, line 14 man staav vins uz eclub.lv open(logs/yshout.prefs.txt): failed to open stream: Permission denied. jau es itkaa maaku izlabot jauzliek uz 777 Link to comment Share on other sites More sharing options...
andrisp Posted January 6, 2008 Report Share Posted January 6, 2008 Tu uzliki faila chmod 777, bet vienalga neiet ? Jautā eclub.lv. Link to comment Share on other sites More sharing options...
foxc Posted January 6, 2008 Author Report Share Posted January 6, 2008 Tu uzliki faila chmod 777, bet vienalga neiet ? Jautā eclub.lv. kaadam chmod?? nesapratu'? Link to comment Share on other sites More sharing options...
bubu Posted January 6, 2008 Report Share Posted January 6, 2008 Tu pats sev jau atbildēji kā atrisināt savu problēmu: jau es itkaa maaku izlabot jauzliek uz 777 Link to comment Share on other sites More sharing options...
Mikijs Posted January 6, 2008 Report Share Posted January 6, 2008 ieej sava FTP caur explorer uzspied ar labo peles pogu uz "filestorage.class.php" uzspied properties.. atjeksee visus keksiisus spied ok un tas i vis :) Link to comment Share on other sites More sharing options...
foxc Posted January 6, 2008 Author Report Share Posted January 6, 2008 (edited) ir viss bumbaas uzliku diviem failiem 777 un vaiss aizgaaja thx http://breake.eclub.lv Edited January 6, 2008 by foxc Link to comment Share on other sites More sharing options...
Recommended Posts