Кто сможет объяснить почему так и что я не так делаю?
class CheckingNewFile
{
private $dir;
private $dir_text;
private $contents;
private $amount;
function __construct()
{
$this->contents = Array();
$this->dir_text = "../../../new";
if ( @($this->dir = opendir($this->dir_text)) == false )
{
mkdir( "../../../new", 0770 );
$this->dir = opendir($this->dir_text);
}
chdir($this->dir_text);
for ($i = 0; false !== ($c = readdir($this->dir)); $i++ )
{
if ( $c == "." || $c == ".." )
continue;
else if ( is_file($c) ) {
$temp = explode(".", $c);
$this->contents[$i] = $temp[0];
echo "contents = $this->contents[$i] <br/>";
}
else {
$this->contents[$i] = $c;
echo "contents = $this->contents[$i]<br />";
}
}
$this->amount = count($contents);
echo "amount = $this->amount";
}
}
Заранее спасибо)