本文整理汇总了PHP中helpers\Assets::media方法的典型用法代码示例。如果您正苦于以下问题:PHP Assets::media方法的具体用法?PHP Assets::media怎么用?PHP Assets::media使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类helpers\Assets
的用法示例。
在下文中一共展示了Assets::media方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: date
?>
</td>
<td class="center"><?php
echo $item->media_title;
?>
</td>
<td class="center"><?php
echo $item->media_description;
?>
</td>
<td class="center">
<?php
if ($item->category_title == 'image') {
echo Assets::image($item->media_file, '', 'width: 200px');
} else {
if (Assets::media($item->media_file) == true) {
echo "<a href='" . ROOT_DIR . $item->media_file . "' target='_blank'>View in Browser</a>";
} else {
echo 'File does not exist';
}
}
?>
</td>
<td class="center"><?php
echo date("d/m/Y", $item->media_created);
?>
</td>
<td class="center">
<span class="label
<?php
示例2: date
</td>
<td class="center"><?php
echo $item->song_title;
?>
</td>
<td class="center"><?php
echo $item->song_description;
?>
</td>
<td class="center"><?php
echo Assets::image($item->song_image, '', 'width: 100px');
?>
</td>
<td class="center">
<?php
if (Assets::media($item->song_file) == true) {
echo "<a href='" . ROOT_DIR . $item->song_file . "' target='_blank'>View in Browser</a>";
} else {
echo 'File does not exist';
}
?>
</td>
<td class="center"><?php
echo $item->song_duration;
?>
</td>
<td class="center"><?php
echo date("d/m/Y", $item->song_created);
?>
</td>
<td class="center">
示例3:
<div class="control-group">
<label class="control-label" for="date01">Title</label>
<div class="controls">
<input type="text" name="title" class="input-xlarge" id="date01" value="<?php
echo $song->song_title;
?>
" placeholder="Add Song Title">
</div>
</div>
<div class="control-group">
<label class="control-label">Upload Mp3</label>
<div class="controls">
<input type="file" name="mp3">
<?php
if (Assets::media($song->song_file) == true) {
echo "<a href='" . ROOT_DIR . $song->song_file . "' target='_blank'>View in Browser</a>";
} else {
echo 'File does not exist';
}
?>
</div>
</div>
<div class="control-group">
<label class="control-label">Song Cover</label>
<div class="controls">
<input type="file" name="image">
<?php
echo Assets::image($song->song_image, '', 'width: 100px');
示例4:
</div>
</div>
<div class="control-group">
<label class="control-label">File Upload</label>
<div class="controls">
<input type="file" name="image">
</div>
<div class="controls">
<?php
if ($media->category_title == 'image') {
echo Assets::image($media->media_file, '', 'width: 200px');
} else {
if (Assets::media($media->media_file) == true) {
echo "<a href='" . ROOT_DIR . $media->media_file . "' target='_blank'>View in Browser</a>";
} else {
echo 'File does not exist';
}
}
?>
</div>
</div>
<div class="control-group hidden-phone">
<label class="control-label" for="textarea2">Description</label>
<div class="controls">
<textarea class="cleditor" name="description" id="textarea2" rows="3"><?php
echo $media->media_description;