Code: Select all
$d = dir("$direktori/$avatarcategory");
while (false !== ($entry = $d->read())) {
if( preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $entry) ) {
if( $entry != '.' && $entry != '..' && !is_file($d . '/' . $entry) && !is_link($d . '/' . $entry) ) {
$patterns[0] = "/\.gif/";
$patterns[1] = "/\.png/";
$patterns[2] = "/\.jpg/";
//more code
}
//more code
}
//more code
}Code: Select all
Catchable fatal error: Object of class Directory could not be converted to string ....Code: Select all
&& !is_file($d . '/' . $entry) && !is_link($d . '/' . $entry)