当前位置: 首页>>代码示例>>PHP>>正文


PHP PwUpload::MakeThumb方法代码示例

本文整理汇总了PHP中PwUpload::MakeThumb方法的典型用法代码示例。如果您正苦于以下问题:PHP PwUpload::MakeThumb方法的具体用法?PHP PwUpload::MakeThumb怎么用?PHP PwUpload::MakeThumb使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PwUpload的用法示例。


在下文中一共展示了PwUpload::MakeThumb方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

     }
 }
 foreach ($diaryAttachs as $at) {
     if ($at['type'] == 'img') {
         $a_url = geturl($at['attachurl'], 'show');
         $attach_ext = strtolower(substr(strrchr($a_url[0], '.'), 1));
         $prename = substr(md5($timestamp . randstr(8)), 10, 15);
         $filename = $winduid . "_{$did}_{$prename}.{$attach_ext}";
         $attachurl = "{$savedir}/{$filename}";
         $fileuplodeurl = "{$attachdir}/diary/{$attachurl}";
         $uploadSerivce->postupload($a_url[0], $fileuplodeurl);
         if ($db_ifathumb) {
             $thumbdir = "thumb/diary/{$attachurl}";
             $thumburl = "{$attachdir}/{$thumbdir}";
             $ifthumb = 1;
             $thumbsize = $uploadSerivce->MakeThumb($fileuplodeurl, $thumburl, $db_athumbsize, $ifthumb);
         }
         $data = array('did' => $did, 'uid' => $winduid, 'hits' => 0, 'name' => $at['name'], 'type' => $at['type'], 'size' => $at['size'], 'attachurl' => 'diary/' . $attachurl, 'needrvrc' => $at['needrvrc'], 'special' => $at['special'], 'ctype' => $at['ctype'], 'uploadtime' => $timestamp, 'descrip' => $at['descrip'], 'ifthumb' => 0);
         $db->update("INSERT INTO pw_attachs SET " . S::sqlSingle($data));
         $aid = $db->insert_id();
         $data['aid'] = $aid;
         $aids[] = $data['aid'];
         $diaryAid[$aid] = $data;
     }
 }
 //*=======拷贝图片===========*//
 $diaryAid = $diaryAid ? serialize($diaryAid) : '';
 if ($aids) {
     preg_match_all('/attachment=(\\d+)/i', $diary['content'], $result);
     $diary['content'] = str_replace($result[1], $aids, $diary['content']);
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:index.php


注:本文中的PwUpload::MakeThumb方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。