public function set_array($set_value) {
/*set empty class*/
$tempclass = new stdClass();
/*full Image path src*/
$search_dir = "/domain/img/company/Image1-000000-016";
/*open dir*/
$images = glob("$search_dir/*.*");
sort($images);
/*loop thought dir and get first Image*/
if (count($images) > 0) {
/*get product imagepath and set as src*/
$tempclass->src = $images[0];
/*return all data to array*/
$this->Imagedata[] = clone($tempclass);
}
}
Meine Absicht war, meine Ordnerbild zu überprüfen und speichern erste Bild Imagedata[]
, aber ich halte die Überprüfung der Imagedata[]
leer ist, ich weiß nicht, warum. Ich habe auch den Ordnerpfad überprüft, es ist richtig, also was habe ich falsch gemacht?prüfen Ordner alle Bild und speichern erste erste Bild Array
sorry ich falsch eingeben, meine Datei war images $ aber noch habe ich leeres Array. –