本文整理汇总了PHP中cls_image::validate_image方法的典型用法代码示例。如果您正苦于以下问题:PHP cls_image::validate_image方法的具体用法?PHP cls_image::validate_image怎么用?PHP cls_image::validate_image使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cls_image
的用法示例。
在下文中一共展示了cls_image::validate_image方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: empty
}
/* 设置最长执行时间为5分钟 */
@set_time_limit(300);
if (isset($_GET['start'])) {
$page_size = 50;
// 默认50张/页
$thumb = empty($_GET['thumb']) ? 0 : 1;
$watermark = empty($_GET['watermark']) ? 0 : 1;
$change = empty($_GET['change']) ? 0 : 1;
$silent = empty($_GET['silent']) ? 0 : 1;
/* 检查GD */
if ($image->gd_version() < 1) {
make_json_error($_LANG['missing_gd']);
}
/* 如果需要添加水印,检查水印文件 */
if (!empty($_CFG['watermark']) && $_CFG['watermark_place'] > 0 && $watermark && !$image->validate_image($_CFG['watermark'])) {
make_json_error($image->error_msg());
}
$title = '';
if (isset($_GET['total_icon'])) {
$count = $db->GetOne("SELECT COUNT(*) FROM " . $ecs->table('goods') . " AS g WHERE g.original_img <> ''" . $goods_where);
$title = sprintf($_LANG['goods_format'], $count, $page_size);
}
if (isset($_GET['total_album'])) {
$count = $GLOBALS['db']->GetOne("SELECT COUNT(*) FROM " . $GLOBALS['ecs']->table('goods_gallery') . ' AS album ' . $album_where);
$title = sprintf(' ' . $_LANG['gallery_format'], $count, $page_size);
$module_no = 1;
}
$result = array('error' => 0, 'message' => '', 'content' => '', 'module_no' => $module_no, 'done' => 1, 'title' => $title, 'page_size' => $page_size, 'page' => 1, 'thumb' => $thumb, 'watermark' => $watermark, 'total' => 1, 'change' => $change, 'silent' => $silent, 'do_album' => $do_album, 'do_icon' => $do_icon, 'goods_id' => $goods_id, 'brand_id' => $brand_id, 'cat_id' => $cat_id, 'row' => array('new_page' => sprintf($_LANG['page_format'], 1), 'new_total' => sprintf($_LANG['total_format'], ceil($count / $page_size)), 'new_time' => $_LANG['wait'], 'cur_id' => 'time_1'));
die($json->encode($result));
} else {