當前位置: 首頁>>代碼示例>>PHP>>正文


PHP cls_image::validate_image方法代碼示例

本文整理匯總了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('&nbsp;' . $_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 {
開發者ID:YangZeSummer,項目名稱:NanJingSecond-Hand,代碼行數:31,代碼來源:picture_batch.php


注:本文中的cls_image::validate_image方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。