私は一日中見つけようとしていたいくつかのエラーを含むコードを持っています...これが(すべき)何をするか:フォルダ内のすべてのファイルを調べて、それが画像タイプであるかどうかを確認します、いくつかのフォルダーにサムネイルを作成します。それは仕事をしますが、その後は続行しません。エコーコマンドを入力しましたが、実行されませんでした。どんな助けにも感謝します!どうもありがとう。
$bilddateitypen = array('gif','jpg','JPG','GIF');
$importdir = '../sync';
if ($handle = opendir($importdir)) {
while (($file = readdir($handle)) !== false) {
if (!is_dir($importdir."/".$file) && is_file($importdir."/".$file)) {
$ex = explode('.',$file);
if(in_array($ex[count($ex)-1], $bilddateitypen)) {
$file = utf8_decode($file);
$thumbnail = new thumbnail($importdir."/".$file);
$thumbnail->jpeg_quality(93);
$thumbnail->save("../shop/images/product_images/original_images/".$file);
$thumbnail->size_auto(500);
$thumbnail->save("../shop/images/product_images/popup_images/".$file);
$thumbnail->size_auto(200);
$thumbnail->save("../shop/images/product_images/info_images/".$file);
$thumbnail->size_auto(112);
$thumbnail->save("../shop/images/product_images/thumbnail_images/".$file);
} else {
continue;
}
}
}
closedir($handle);
}
echo "Hallo Welt";