本文整理汇总了PHP中sp_get_asset_upload_path函数的典型用法代码示例。如果您正苦于以下问题:PHP sp_get_asset_upload_path函数的具体用法?PHP sp_get_asset_upload_path怎么用?PHP sp_get_asset_upload_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sp_get_asset_upload_path函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sp_get_user_avatar_url
/**
* 获取用户头像相对网站根目录的地址
*/
function sp_get_user_avatar_url($avatar)
{
if ($avatar) {
if (strpos($avatar, "http") === 0) {
return $avatar;
} else {
return sp_get_asset_upload_path("../avatar/" . $avatar);
}
} else {
return $avatar;
}
}
示例2: leuu
?>
<div class="item">
<div class="tc-gridbox">
<div class="header">
<?php
if (!empty($smeta['thumb'])) {
?>
<div class="item-image">
<a href="<?php
echo leuu('article/index', array('id' => $vo['tid']));
?>
">
<img src="<?php
echo sp_get_asset_upload_path($smeta['thumb']);
?>
" class="img-responsive" alt="<?php
echo $vo["post_title"];
?>
">
</a>
</div>
<?php
} else {
}
?>
<h3><a href="<?php
echo leuu('article/index', array('id' => $vo['tid']));
?>
示例3: foreach
<tr>
<th width="80">相册图集 </th>
<td>
<fieldset class="blue pad-10">
<legend>图片列表</legend>
<ul id="photos" class="picList unstyled">
<?php
if (is_array($smeta['photo'])) {
foreach ($smeta['photo'] as $key => $vo) {
?>
<li id="savedimage<?php
echo $key;
?>
">
<input type="text" name="photos_url[]" value="<?php
echo sp_get_asset_upload_path($vo['url']);
?>
" title='双击查看' style="width:310px;" ondblclick="image_priview(this.value);" class="input">
<input type="text" name="photos_alt[]" value="<?php
echo $vo["alt"];
?>
" style="width:160px;" class="input" onfocus="if(this.value == this.defaultValue) this.value = ''" onblur="if(this.value.replace(' ','') == '') this.value = this.defaultValue;">
<a href="javascript:remove_div('savedimage<?php
echo $key;
?>
')">移除</a>
</li><?php
}
}
?>
</ul>
示例4: sp_get_asset_upload_path
<tr>
<td>
<div style="text-align: center;"><input type='hidden' name='slide_pic' id='thumb' value='<?php
echo $slide_pic;
?>
'>
<a href='javascript:void(0);' onclick="flashupload('thumb_images', '附件上传','thumb',thumb_images,'1,jpg|jpeg|gif|png|bmp,1,,,1','','','');return false;">
<?php
if (empty($slide_pic)) {
?>
<img src="/statics/images/icon/upload-pic.png" id='thumb_preview' width='135' height='113' style='cursor:hand' />
<?php
} else {
?>
<img src="<?php
echo sp_get_asset_upload_path($slide_pic);
?>
" id='thumb_preview' width='135' height='113' style='cursor:hand;height:113px;' /><?php
}
?>
</a>
<input type="button" class="btn" onclick="$('#thumb_preview').attr('src','/statics/images/icon/upload-pic.png');$('#thumb').val('');return false;" value="取消图片">
</div>
</td>
</tr>
</table>
</div>
</div>
<div class="col-auto">
示例5: empty
$home_slides = empty($home_slides) ? $default_home_slides : $home_slides;
?>
<ul id="homeslider" class="unstyled">
<?php
if (is_array($home_slides)) {
foreach ($home_slides as $key => $vo) {
?>
<li>
<div class="caption-wraper">
</div>
<a href="<?php
echo $vo["slide_url"];
?>
"><img src="<?php
echo sp_get_asset_upload_path($vo['slide_pic']);
?>
" alt=""></a>
</li><?php
}
}
?>
</ul>
<link href="http://mooc2.edusoho.cn/assets/v2/bootstrap/css/bootstrap.css?1.4.9" rel="stylesheet">
<link rel="stylesheet" media="screen" href="http://mooc2.edusoho.cn/themes/mooc/css/theme.css?1.4.9">
<section class="es-section section-gray" id="course-list">
<div class="container">
<div class="course-filter section-header" id="course-filter">
推荐课程