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


PHP sp_get_asset_upload_path函数代码示例

本文整理汇总了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;
    }
}
开发者ID:noikiy,项目名称:luokeke2,代码行数:15,代码来源:function.php

示例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']));
            ?>
开发者ID:feng8605765,项目名称:xmmusic,代码行数:31,代码来源:9b16693bcf269da6d9d731bc3bf6cd7b.php

示例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>
开发者ID:huangkaijin,项目名称:simei,代码行数:31,代码来源:319bcd786882911ba6f68c164c4aced5.php

示例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">
开发者ID:elinxer,项目名称:hualilibrary,代码行数:31,代码来源:3428a25cb8c9eb21e8229b27bff9817a.php

示例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">
            推荐课程
开发者ID:wanhaha,项目名称:school,代码行数:31,代码来源:b38d1014a632cf5d5e26dc69ef89f859.php


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