Witam, bardzo proszę was o pomoc gdy probuję ocenić zdjęcie lub dodać komentarz wywala :
Warning: Invalid argument supplied for foreach() in /home/testowon/domains/strona.pl/public_html/lib/cache.php on line 53
Warning: Invalid argument supplied for foreach() in /home/testowon/domains/strona.pl/public_html/lib/cache.php on line 57
Warning: Cannot modify header information - headers already sent by (output started at /home/testowon/domains/strona.pl/public_html/lib/cache.php:53) in /home/testowon/domains/strona.pl/public_html/index.php on line 137
Kod pliku cache.php:
<?php
/*
The Cache class reads and writes complete pages from the cache.
The name of a cache file is based on its URL
*/
class Cache {
private $fileName = '';
private $path = '';
private $enabled = true;
private $captured = false;
public function __construct( $path, $pageName ) {
$this->path = $path;
$this->fileName = $this->path . strtr( $pageName, '?&', '--' ) . '.html';
if( $_SERVER['REQUEST_METHOD'] != 'GET' ) {
$this->enabled = false;
}
}
public function disable() {
$this->enabled = false;
}
public function forceEnable() {
$this->enabled = true;
}
public function lookup() {
$fp = fopen($this->fileName, 'rb'); }
}
public function capture() {
if( $this->enabled ) {
$this->captured = true;
}
}
public function clear( $pattern = '' ) {
require_once( 'lib/filesystem.php' );
Filesystem::rmdirr( $this->path, true );
} else {
$files = glob( $this->path . 'all/view/' . strtr( $pattern, '?&', '--' ) . '.html' ); foreach( $files as $f ) {
}
$files = glob( $this->path . 'user/*/view/' . strtr( $pattern, '?&', '--' ) . '.html' ); foreach( $files as $f ) {
}
}
}
public function write() {
if( $this->captured ) {
require_once( 'lib/filesystem.php' );
Filesystem
::mkdirr( dirname($this->fileName) ); }
}
}
?>
Ktos wie jak to naprawić?
Pozdrawiam