31 final public function write($data)
33 $this->wfp = fopen($this->name,
"wb");
34 fwrite($this->wfp,$data);
41 final public function read()
43 $this->rfp = fopen($this->name,
"rb");
45 while (!feof($this->rfp))
47 $this->contents .= fread($this->rfp, 8192);
50 return $this->contents;
70 chmod(
"../fw_core/", 0777);
71 chmod(
"../fw_cache/", 0777);
72 chmod(
"../fw_headers/", 0777);
73 chmod(
"../fw_modules/", 0777);
74 chmod(
"../fw_libraries/", 0777);
75 chmod(
"../fw_script/", 0777);
84 chmod(
"../fw_core/", 0700);
85 chmod(
"../fw_cache/", 0700);
86 chmod(
"../fw_headers/", 0700);
87 chmod(
"../fw_modules/", 0700);
88 chmod(
"../fw_libraries/", 0700);
89 chmod(
"../fw_script/", 0700);
112 $blockTags =
'/?p|/?h\\d|li|dt|br|hr|/tr';
114 $text = preg_replace(
'~<!--.*-->~sU',
'', $text);
115 $text = preg_replace(
'~<(script|style|head).*</\\1>~isU',
'', $text);
116 $text = preg_replace(
'~<(td|th|dd)[ >]~isU',
' \\0', $text);
117 $text = preg_replace(
'~\\d+~u',
' ', $text);
118 $text = preg_replace(
'~<($blockTags)[ >/]~i',
'\n\\0', $text);
119 $text = strip_tags($text);
120 $text = html_entity_decode($text, ENT_QUOTES,
"utf-8");