當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。