芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/lugarcollectibles.com/admin/model/tool/image.php
filemtime(DIR_IMAGE . $image_new))) { list($width_orig, $height_orig, $image_type) = getimagesize(DIR_IMAGE . $image_old); if (!in_array($image_type, array(IMAGETYPE_PNG, IMAGETYPE_JPEG, IMAGETYPE_GIF))) { return DIR_IMAGE . $image_old; } $path = ''; $directories = explode('/', dirname($image_new)); foreach ($directories as $directory) { $path = $path . '/' . $directory; if (!is_dir(DIR_IMAGE . $path)) { @mkdir(DIR_IMAGE . $path, 0777); } } if ($width_orig != $width || $height_orig != $height) { $image = new Image(DIR_IMAGE . $image_old); $image->resize($width, $height); $image->save(DIR_IMAGE . $image_new); } else { copy(DIR_IMAGE . $image_old, DIR_IMAGE . $image_new); } } if ($this->request->server['HTTPS']) { return HTTPS_CATALOG . 'image/' . $image_new; } else { return HTTP_CATALOG . 'image/' . $image_new; } } }