本文整理汇总了PHP中getImageUrl函数的典型用法代码示例。如果您正苦于以下问题:PHP getImageUrl函数的具体用法?PHP getImageUrl怎么用?PHP getImageUrl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getImageUrl函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getChannels
/**
* 获取频道分类数据
* @return array 所有频道分类数据
*/
public function getChannels($uid, $count = 6, $page = 1, $order = 'sort asc', $sql = '')
{
$start = ($page - 1) * $count;
$end = $count;
$data = D('channel_category')->where($sql)->order($order)->limit("{$start}, {$end}")->findAll();
foreach ($data as $k => $v) {
if (!empty($v['ext'])) {
$ext = unserialize($v['ext']);
$v = array_merge($v, $ext);
}
$data[$k] = $v;
}
// 组装附件信息
$attachIds = getSubByKey($data, 'attach');
$attachIds = array_filter($attachIds);
$attachIds = array_unique($attachIds);
$attachInfos = model('Attach')->getAttachByIds($attachIds);
$attachData = array();
foreach ($attachInfos as $attach) {
$attachData[$attach['attach_id']] = $attach;
}
foreach ($data as &$value) {
if (!empty($value['attach']) && !empty($attachData[$value['attach']])) {
$value['icon_url'] = getImageUrl($attachData[$value['attach']]['save_path'] . $attachData[$value['attach']]['save_name']);
} else {
$value['icon_url'] = null;
}
unset($value['ext'], $value['attach'], $value['user_bind'], $value['topic_bind']);
if ($uid) {
$value['followStatus'] = intval(D('ChannelFollow', 'channel')->getFollowStatus($uid, $value['channel_category_id']));
}
}
return $data;
}
开发者ID:omusico,项目名称:ThinkSNS-4,代码行数:38,代码来源:ChannelApiModel.class.php
示例2: logo_path_to_url
/**
* 根据群组Logo的保存路径获取Logo的URL
*
* @param string $save_path 群组Logo的保存路径
* @return string 群组Logo的URL. 给定路径不存在时, 返回默认的群组Logo的URL地址.
*/
function logo_path_to_url($save_path, $width = 100, $height = 100)
{
$path = getImageUrl($save_path, $width, $height, true);
if ($save_path != 'default.gif') {
return $path;
} else {
return SITE_URL . '/apps/group/Tpl/default/Public/images/group_pic.gif';
}
}
开发者ID:lyhiving,项目名称:icampus,代码行数:15,代码来源:common.php
示例3: getCover
function getCover($coverId, $width = 100, $height = 100)
{
if ($coverId > 0) {
$cover = model('Attach')->where("attach_id={$coverId}")->find();
}
if ($cover) {
$cover = getImageUrl($cover['save_path'] . $cover['save_name'], $width, $height, true);
} else {
$cover = SITE_URL . '/apps/event/_static/images/hdpic1.gif';
}
return $cover;
}
开发者ID:lyhiving,项目名称:icampus,代码行数:12,代码来源:common.php
示例4: index
/**
* 微吧管理首页-修改微吧信息
* @return void
*/
public function index()
{
$weiba_id = intval($_GET['weiba_id']);
$this->assign('weiba_id', $weiba_id);
$weiba_detail = D('weiba')->where('weiba_id=' . $weiba_id)->find();
if ($weiba_detail['logo']) {
$logo = D('attach')->where('attach_id=' . $weiba_detail['logo'])->find();
$weiba_detail['logo_url'] = getImageUrl($logo['save_path'] . $logo['save_name']);
}
$this->assign('weiba_detail', $weiba_detail);
$this->display();
}
开发者ID:naliduo,项目名称:ThinkSNS,代码行数:16,代码来源:LogAction.class.php
示例5: createMapping
function createMapping($field)
{
$arr['title'] = $field['vendor'] . ' ' . $field['name'];
$arr['body_html'] = $field['description'];
$arr['vendor'] = $field['vendor'];
$arr['product_type'] = $field['type'];
$arr['tags'] = getTags($field['tags']);
$arr['images'] = array(getImageUrl(IMAGE_BASE_URL, $field['image']));
$arr['metafields_global_title_tag'] = 'Paramount BP ' . $arr['title'];
$arr['metafields_global_description_tag'] = $field['meta_description'];
$arr['variants'] = array(getbasicVariants($field));
return $arr;
}
开发者ID:sarvesh123,项目名称:home-shopify,代码行数:13,代码来源:functions.php
示例6: getMedalByUid
/**
* 返回用户勋章
* @param unknown_type $uid
*/
public function getMedalByUid($uid)
{
$list = D()->query('select b.* from ' . C('DB_PREFIX') . 'medal_user a inner join ' . C('DB_PREFIX') . 'medal b on a.medal_id=b.id where a.uid=' . $uid . ' order by a.ctime desc');
if (is_array($list)) {
foreach ($list as &$v) {
$src = explode('|', $v['src']);
$v['src'] = getImageUrl($src[1]);
$smallsrc = explode('|', $v['small_src']);
$v['small_src'] = getImageUrl($smallsrc[1]);
}
}
return $list;
}
开发者ID:yang7hua,项目名称:hunshe,代码行数:17,代码来源:MedalModel.class.php
示例7: index
public function index()
{
//echo $_GET['domain'];exit;
if ($_GET['domain']) {
$map['domain'] = t($_GET['domain']);
//echo $domain;exit;
$data['search_key'] = model('FeedTopic')->where($map)->getField('topic_name');
} else {
$data['search_key'] = $this->__getSearchKey();
}
// 专题信息
if (false == ($data['topics'] = model('FeedTopic')->getTopic($data['search_key'], false))) {
if (!$data['topics']) {
$this->error('此话题不存在');
}
$data['topics']['name'] = t($data['search_key']);
}
if ($data['topics']['lock'] == 1) {
$this->error('该话题已被屏蔽');
}
if ($data['topics']['pic']) {
$pic = D('attach')->where('attach_id=' . $data['topics']['pic'])->find();
//$data['topics']['pic'] = UPLOAD_URL.'/'.$pic['save_path'].$pic['save_name'];
$pic_url = $pic['save_path'] . $pic['save_name'];
$data['topics']['pic'] = getImageUrl($pic_url);
}
$data['topic'] = $data['search_key'] ? $data['search_key'] : html_entity_decode($data['topics']['name'], ENT_QUOTES, 'UTF-8');
$data['topic_id'] = $data['topics']['topic_id'] ? $data['topics']['topic_id'] : model('FeedTopic')->getTopicId($data['search_key']);
$initHtml = '#' . $data['search_key'] . '#';
$this->assign('initHtml', $initHtml);
$this->assign($data);
//seo
$seo = model('Xdata')->get("admin_Config:seo_feed_topic");
$replace['topicName'] = $data['topic'];
$replace['topicNote'] = $data['topics']['note'];
$replace['topicDes'] = $data['topics']['des'];
if ($lastTopic = D('feed_data')->where('feed_id=' . D('feed_topic_link')->where('topic_id=' . $data['topic_id'])->order('feed_topic_id desc')->limit(1)->getField('feed_id'))->getField('feed_content')) {
$replace['lastTopic'] = $lastTopic;
}
$replaces = array_keys($replace);
foreach ($replaces as &$v) {
$v = "{" . $v . "}";
}
$seo['title'] = str_replace($replaces, $replace, $seo['title']);
$seo['keywords'] = str_replace($replaces, $replace, $seo['keywords']);
$seo['des'] = str_replace($replaces, $replace, $seo['des']);
!empty($seo['title']) && $this->setTitle($seo['title']);
!empty($seo['keywords']) && $this->setKeywords($seo['keywords']);
!empty($seo['des']) && $this->setDescription($seo['des']);
$this->display();
}
开发者ID:lyhiving,项目名称:icampus,代码行数:51,代码来源:TopicAction.class.php
示例8: formatMedal
/**
* 格式化出需要的数据
*
* @param array $medals 数据库原始勋章数据
* @param array [$data] 额外携带的数据
* @return array
* @author Seven Du <[email protected]>
**/
private function formatMedal(array $medals, array $data = array())
{
foreach ($medals as $value) {
$medal = array();
$medal['id'] = $value['id'];
$medal['name'] = $value['name'];
$medal['desc'] = $value['desc'];
$medal['icon'] = getImageUrl(explode('|', $value['src'])[1]);
$medal['show'] = getImageUrl(explode('|', $value['share_card'])[1]);
array_push($data, $medal);
}
unset($medals, $value, $medal);
return $data;
}
开发者ID:songhongyu,项目名称:THINKSNS,代码行数:22,代码来源:MedalApi.class.php
示例9: newslist
/**
* 页面列表
*/
public function newslist()
{
$_REQUEST['tabHash'] = 'newslist';
//按钮
//$this->pageButton[] = array('uid','title'=>'搜索', 'onclick'=>"admin.fold('search_form')");
$this->pageButton[] = array('uid', 'title' => '删除', 'onclick' => "admin.deleteInfo();");
$this->pageButton[] = array('uid', 'title' => '添加资讯', 'onclick' => "location.href='" . U('news/admin/setinfo', array('tabHash' => 'newslist')) . "';");
//处理分类HASH
$cs = model('CategoryTree')->setTable('news_category')->getCategoryList();
$categorys = array();
foreach ($cs as $ct) {
$categorys[$ct['news_category_id']] = $ct;
}
//构造搜索条件
//列表key值 DOACTION表示操作
$this->pageKeyList = array('image', 'news_title', 'news_content', 'state', 'is_top', 'hits', 'date', 'DOACTION');
$listData = M('News')->order('news_id desc')->findPage(15);
foreach ($listData['data'] as $key => $val) {
$listData['data'][$key]['id'] = $val['news_id'];
$thumb = APPS_URL . '/' . APP_NAME . '/_static/nopic.jpg';
if ($val['image']) {
$attach = model('Attach')->getAttachById($val['image']);
if ($attach) {
$thumb = getImageUrl($attach['save_path'] . $attach['save_name'], 100, 100, true);
}
}
//获取分类
$type_str = '';
if ($val['type_id']) {
if (isset($categorys[$val['type_id']])) {
$type_str .= $categorys[$val['type_id']]['title'];
if (isset($categorys[$categorys[$val['type_id']]['pid']])) {
$type_str = $categorys[$categorys[$val['type_id']]['pid']]['title'] . '--' . $type_str;
}
}
}
$listData['data'][$key]['image'] = '<img src="' . $thumb . '">';
$listData['data'][$key]['news_title'] = msubstr($val['news_title'], 0, 20) . "<BR><BR><font style='color:#7d7d7d;'>分类: " . $type_str . "</font>";
$listData['data'][$key]['news_content'] = msubstr(strip_tags($val['news_content']), 0, 20);
$listData['data'][$key]['state'] = D('News')->getState($val['state']);
$listData['data'][$key]['date'] = '创建:' . date('m/d G:i', $val['created']);
if ($val['updated']) {
$listData['data'][$key]['date'] .= '<br>更新:' . date('m/d G:i', $val['updated']);
}
$listData['data'][$key]['is_top'] = $val['is_top'] ? '<font color="red">置顶</font>' : '否';
$listData['data'][$key]['DOACTION'] = '<a href="' . U('news/admin/setinfo', array('news_id' => $val['news_id'], 'tabHash' => 'setinfo')) . '">编辑</a>';
}
$this->displayList($listData);
}
开发者ID:lyhiving,项目名称:icampus,代码行数:52,代码来源:AdminAction.class.php
示例10: convertImgUrl
private function convertImgUrl($list)
{
foreach ($list as &$vo) {
$vo['img_url'] = getImageUrl($vo['img']);
unset($vo['img']);
unset($vo['id']);
unset($vo['notes']);
unset($vo['uid']);
unset($vo['storeid']);
unset($vo['createtime']);
unset($vo['starttime']);
unset($vo['endtime']);
unset($vo['noticetime']);
}
return $list;
}
开发者ID:h136799711,项目名称:baseItboye,代码行数:16,代码来源:BannersController.class.php
示例11: getReplyList
/**
* 获取回复列表
* @param array $map 查询条件
* @param string $order 排序条件,默认为comment_id ASC
* @param int $limit 结果集数目,默认为10
* @return array 评论列表信息
*/
public function getReplyList($map = null, $order = 'reply_id desc', $limit = 10)
{
!isset($map['is_del']) && ($map['is_del'] = 0);
$data = $this->where($map)->order($order)->findPage($limit);
// // TODO:后续优化
foreach ($data['data'] as &$v) {
$v['user_info'] = model('User')->getUserInfo($v['uid']);
$v['user_info']['groupData'] = model('UserGroupLink')->getUserGroupData($v['uid']);
//获取用户组信息
$v['content'] = parse_html(h(htmlspecialchars($v['content'])));
//$v['sourceInfo'] = model('Source')->getSourceInfo($v['table'], $v['row_id'], false, $v['app']);
$v['attach_info'] = model('Attach')->getAttachById($v['attach_id']);
if ($v['attach_info']['attach_type'] == 'weiba_comment_image' || $v['attach_info']['attach_type'] == 'feed_image') {
$v['attach_info']['attach_url'] = getImageUrl($v['attach_info']['save_path'] . $v['attach_info']['save_name'], 590);
}
}
return $data;
}
开发者ID:medz,项目名称:thinksns-4,代码行数:25,代码来源:WeibaReplyModel.class.php
示例12: index
public function index()
{
$u['savepath'] = '';
$u['savename'] = '';
list($width, $height) = getimagesize(getImageUrl($u['savepath'] . $u['savename']));
exit;
$demo = json_decode(file_get_contents('http://tsimg.tsurl.cn/2013/0819/16/5211de3274738.jpg!exif'));
settype($demo, 'array');
dump($demo);
exit;
// $str = 'http://tsimg.tsurl.cn/2013/0819/16/5211de3274738.jpg!exif';
$str = 'http://tsimg.tsurl.cn/2013/0819/16/5211de327473832123.jpg!exif';
$demo = file_get_contents($str);
$demo = json_decode($demo);
dump($demo->width);
dump($demo->height);
dump($demo);
}
开发者ID:lyhiving,项目名称:icampus,代码行数:18,代码来源:TestAction.class.php
示例13: login
public function login()
{
// 登录验证
$passport = model('Passport');
if ($passport->isLogged()) {
$this->redirect(U('w3g/Index/index'));
}
//载入站点配置全局变量
if ($GLOBALS['ts']['site']['site_logo_w3g'] == '') {
$w3gLogoUrl = 'img/logo.png';
} else {
$attach = model('Attach')->getAttachById($GLOBALS['ts']['site']['site_logo_w3g']);
$w3gLogoUrl = getImageUrl($attach['save_path'] . $attach['save_name']);
}
$this->assign('w3gLogoUrl', $w3gLogoUrl);
// dump($w3gLogoUrl);exit();
$this->assign('is_register_open', $this->isRegisterOpen() ? '1' : '0');
$this->display();
}
开发者ID:yang7hua,项目名称:hunshe,代码行数:19,代码来源:PublicAction.class.php
示例14: render
/**
* 渲染关注按钮模板
* @example
* $data['follower_uid'] integer 用户ID
* @param array $data 渲染的相关配置参数
* @return string 渲染后的模板数据
*/
public function render($data)
{
$var = array();
$var['type'] = 'FollowWeibaList';
$follow = D('weiba_follow')->where('follower_uid=' . $data['follower_uid'])->findAll();
$map['weiba_id'] = array('in', getSubByKey($follow, 'weiba_id'));
$map['is_del'] = 0;
$var['weibaList'] = D('weiba')->where($map)->findAll();
$var['weibaListCount'] = D('weiba')->where($map)->count();
foreach ($var['weibaList'] as $k => $v) {
$logo = D('attach')->where('attach_id=' . $v['logo'])->find();
$var['weibaList'][$k]['logo'] = getImageUrl($logo['save_path'] . $logo['save_name']);
}
is_array($data) && ($var = array_merge($var, $data));
// 渲染模版
$content = $this->renderFile(dirname(__FILE__) . "/followWeibaList.html", $var);
unset($var, $data);
// 输出数据
return $content;
}
开发者ID:naliduo,项目名称:ThinkSNS,代码行数:27,代码来源:FollowWeibaListWidget.class.php
示例15: getTopic
/**
* 获取全部话题
* @param int limit 每页显示条数
* @return array 话题列表
*/
public function getTopic($limit = 20, $isrecommend)
{
if ($isrecommend) {
$map['recommend'] = 1;
}
if ($_POST) {
$_POST['topic_id'] && ($map['topic_id'] = intval($_POST['topic_id']));
$_POST['topic_name'] && ($map['topic_name'] = array('like', '%' . t($_POST['topic_name']) . '%'));
$_POST['recommend'] && ($map['recommend'] = $_POST['recommend'] == 1 ? 1 : 0);
$_POST['essence'] && ($map['essence'] = $_POST['essence'] == 1 ? 1 : 0);
$_POST['lock'] && ($map['lock'] = $_POST['lock'] == 1 ? 1 : 0);
}
$topic_list = D('feed_topic')->where($map)->order('recommend desc,recommend_time desc,ctime desc')->findpage($limit);
//数据格式化
foreach ($topic_list['data'] as $k => $v) {
if ($v['recommend'] == 1) {
$topic_list['data'][$k]['topic_name'] = '<a target="_blank" href="' . U('public/Topic/index', array('k' => urlencode($topic_list['data'][$k]['topic_name']))) . '">' . $topic_list['data'][$k]['topic_name'] . '</a>';
} else {
$topic_list['data'][$k]['topic_name'] = '<a target="_blank" href="' . U('public/Topic/index', array('k' => urlencode($topic_list['data'][$k]['topic_name']))) . '">' . $topic_list['data'][$k]['topic_name'] . '</a>';
}
$pic = D('attach')->where('attach_id=' . $v['pic'])->find();
$topic_list['data'][$k]['pic'] && ($topic_list['data'][$k]['pic'] = '<img src="' . getImageUrl($pic['save_path'] . $pic['save_name']) . '" width="50">');
$topic_user = explode(',', $v['topic_user']);
$topic_user_info = model('User')->getUserInfoByUids($topic_user);
$topic_list['data'][$k]['topic_user'] = '';
foreach ($topic_user as $key => $val) {
$topic_list['data'][$k]['topic_user'] .= $topic_user_info[$val]['space_link'] . '<br />';
}
//dump($topic_list['data'][$k]['topic_user']);exit;
// $isrecommend = $v['recommend']?'是':'否';
// $topic_list['data'][$k]['recommend'] = '<a href="javascript:void(0);" onclick="admin.setTopic(1,'.$v['topic_id'].','.intval($v['recommend']).')">'.$isrecommend.'</a>';
// $isessence = $v['essence']?'是':'否';
// $topic_list['data'][$k]['essence'] = '<a href="javascript:void(0);" onclick="admin.setTopic(2,'.$v['topic_id'].','.intval($v['essence']).')">'.$isessence.'</a>';
$islock = $v['lock'] ? '取消屏蔽' : '屏蔽';
// 操作数据
$topic_list['data'][$k]['DOACTION'] = '<a href="javascript:void(0);" onclick="admin.setTopic(3,' . $v['topic_id'] . ',' . intval($v['lock']) . ')">' . $islock . '</a> - ';
$topic_list['data'][$k]['DOACTION'] .= '<a href="' . U('admin/Content/editTopic', array('topic_id' => $v['topic_id'], 'tabHash' => 'editTopic')) . '">编辑</a>';
//$listData['data'][$k]['DOACTION'] .= '<a href="javascript:void(0)" onclick="admin.deleteUser(\''.$v['uid'].'\')">'.L('PUBLIC_STREAM_DELETE').'</a>';
}
return $topic_list;
}
开发者ID:boxshadow,项目名称:ThinkSNS-4,代码行数:46,代码来源:FeedTopicAdminModel.class.php
示例16: replace
/**
* 这里返回的是模板中需要渲染的变量
*/
public function replace()
{
$time = str_replace(array(' ', '.'), '', microtime());
$var['image'] = $this->attr['image_list'];
$var['effect'] = $this->attr['effect'];
//动画可选 'none','scrollx', 'scrolly', 'fade'
$var['autoPlay'] = $this->attr['autoPlay'];
//是否自动播放
$var['autoPlayInterval'] = $this->attr['autoPlayInterval'];
//自动播放间隔时间
$var['width'] = $this->attr['width'];
$var['height'] = $this->attr['height'];
foreach ($var['image'] as &$value) {
$value->path = getImageUrl($value->path);
$value->url = str_replace('[@]', '&', $value->url);
}
$var['imgId'] = "i" . substr($this->sign, 0, 5) . $time;
$var['imgPanel'] = "i" . substr($this->sign, 0, 6) . $time;
$var['imgNav'] = "i" . substr($this->sign, 0, 7) . $time;
return $var;
}
开发者ID:yang7hua,项目名称:hunshe,代码行数:24,代码来源:DiyImage.php
示例17: showdetail
/**
* 勋章详细
*/
public function showdetail()
{
$id = intval($_GET['id']);
$type = intval($_GET['type']);
if ($id) {
if ($type == 1) {
$umedal = D('medal_user')->where('uid=' . $GLOBALS['ts']['mid'] . ' and medal_id=' . $id)->field('`desc`,ctime')->find();
$desc = $umedal['desc'];
$ctime = $umedal['ctime'];
}
$medal = model('Medal')->where('id=' . $id)->find();
if ($medal) {
$src = explode('|', $medal['src']);
$medal['src'] = getImageUrl($src[1]);
$desc && ($medal['desc'] = $desc);
$ctime && ($medal['ctime'] = date('Y-m-d H:i:s', $ctime));
$this->assign('medal', $medal);
$this->display();
}
}
}
开发者ID:lyhiving,项目名称:icampus,代码行数:24,代码来源:MedalAction.class.php
示例18: getAllChannel
/**
* 获取所有频道分类数据
* @return array 所有频道分类数据
*/
public function getAllChannel()
{
$data = model('CategoryTree')->setTable('channel_category')->getCategoryAllHash();
// 组装附件信息
$attachIds = getSubByKey($data, 'attach');
$attachIds = array_filter($attachIds);
$attachIds = array_unique($attachIds);
$attachInfos = model('Attach')->getAttachByIds($attachIds);
$attachData = array();
foreach ($attachInfos as $attach) {
$attachData[$attach['attach_id']] = $attach;
}
foreach ($data as &$value) {
if (!empty($value['attach']) && !empty($attachData[$value['attach']])) {
$value['icon_url'] = getImageUrl($attachData[$value['attach']]['save_path'] . $attachData[$value['attach']]['save_name']);
} else {
$value['icon_url'] = null;
}
unset($value['ext'], $value['attach'], $value['user_bind'], $value['topic_bind']);
}
return $data;
}
开发者ID:yang7hua,项目名称:hunshe,代码行数:26,代码来源:ChannelApiModel.class.php
示例19: channel
/**
* 频道首页
* @param integer user_id 用户ID
* @param integer page 第几页
* @param integer count 视频条数
* @return json 频道分类+热门视频
*/
public function channel()
{
$page = $this->data['page'] ? intval($this->data['page']) : 1;
$count = $this->data['count'] ? intval($this->data['count']) : 6;
if ($page == 1) {
$this->user_id = empty($this->user_id) ? $this->mid : $this->user_id;
// $data['channels'] = D('ChannelApi', 'channel')->getChannels($this->user_id,6);
$data['channels'] = D('ChannelFollow', 'channel')->getFollowList($this->user_id);
foreach ($data['channels'] as $k => &$v) {
$ext = unserialize($v['ext']);
$v['attach'] = $ext['attach'];
}
// 组装附件信息
$attachIds = getSubByKey($data['channels'], 'attach');
$attachIds = array_filter($attachIds);
$attachIds = array_unique($attachIds);
$attachInfos = model('Attach')->getAttachByIds($attachIds);
$attachData = array();
foreach ($attachInfos as $attach) {
$attachData[$attach['attach_id']] = $attach;
}
foreach ($data['channels'] as &$value) {
if (!empty($value['attach']) && !empty($attachData[$value['attach']])) {
$value['icon_url'] = getImageUrl($attachData[$value['attach']]['save_path'] . $attachData[$value['attach']]['save_name']);
} else {
$value['icon_url'] = null;
}
unset($value['ext'], $value['attach'], $value['user_bind'], $value['topic_bind']);
if ($this->user_id) {
$value['followStatus'] = intval(D('ChannelFollow', 'channel')->getFollowStatus($this->user_id, $value['channel_category_id']));
}
}
}
$data['videos'] = D('ChannelApi', 'channel')->getChannelFeed('', 'postvideo', $count, $page);
return $data;
}
开发者ID:songhongyu,项目名称:THINKSNS,代码行数:43,代码来源:ChannelApi.class.php
示例20: saveEditorFile
/**
* 编辑器文件上传
* @return array 上传文件的信息
*/
public function saveEditorFile()
{
$data['attach_type'] = 'editor_file';
$data['upload_type'] = 'file';
//使用又拍云时,必须指定类型为file
$info = model('Attach')->upload($data);
if ($info['status']) {
$data = $info['info'][0];
$data['src'] = getImageUrl($data['save_path'] . $data['save_name'], 100, 100, true);
$data['extension'] = strtolower($data['extension']);
$return = array('status' => 1, 'data' => $data);
} else {
$return = array('status' => 0, 'data' => $info['info']);
}
echo json_encode($return);
exit;
}
开发者ID:lyhiving,项目名称:icampus,代码行数:21,代码来源:UploadWidget.class.php
注:本文中的getImageUrl函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论