function sc_wipeout_content($room, $idstr) { $fp = fopen(sc_dat_filename($room), "w"); if (flock($fp, LOCK_EX)) { fwrite($fp, sc_dat_encode($room) . "\n"); $output = serialize(array('', $idstr, time(), sc_dat_encode("wiped out"))) . "\n"; fwrite($fp, $output); flock($fp, LOCK_UN); } fclose($fp); }
public function testScDatEncode() { $a = "hello <b>world</b>"; $this->assertEquals('hello <b>world</b>', sc_dat_encode($a)); }