Notice: Undefined index: offset_file in C:\xampp1\htdocs\ali\Classes\Reader.php on line 43
Warning: file(C:\xampp1\htdocs\ali\): failed to open stream: No such file or directory in C:\xampp1\htdocs\ali\Classes\Reader.php on line 44
Warning: file(C:\xampp1\htdocs\ali\): failed to open stream: No such file or directory in C:\xampp1\htdocs\ali\Classes\Reader.php on line 45
Warning: file_put_contents(C:\xampp1\htdocs\ali\): failed to open stream: No such file or directory in C:\xampp1\htdocs\ali\Classes\Reader.php on line 59Notice: Undefined index: offset_file in C:\xampp1\htdocs\ali\Classes\Reader.php on line 43
Warning: file(C:\xampp1\htdocs\ali\): failed to open stream: No such file or directory in C:\xampp1\htdocs\ali\Classes\Reader.php on line 44
Warning: file(C:\xampp1\htdocs\ali\): failed to open stream: No such file or directory in C:\xampp1\htdocs\ali\Classes\Reader.php on line 45
Warning: file_put_contents(C:\xampp1\htdocs\ali\): failed to open stream: No such file or directory in C:\xampp1\htdocs\ali\Classes\Reader.php on line 59
P.S. строка 43 ___ $f2= str_replace('Classes/', '', __DIR__.'/'.$this->config['offset_file']);
public function getPostStrs($filename)
{
$filename = str_replace('Classes/', '', __DIR__.'/'.$filename);
$f2= str_replace('Classes/', '', __DIR__.'/'.$this->config['offset_file']);
$array = file($filename);
$offset = (int) file($f2)[0];
if ($offset+450 > count($array)) {
$offset = 0;
}
$str = '';
$j = 0;
for ($i = 0; $i < 455; $i++) {
if ($i > 4 && $i < 8) {
$str.="\n ";
continue;
}
$str.=$array[$offset+$j];
$j++;
}
file_put_contents($f2, $offset+$j);
return $str;
}