本文整理汇总了PHP中Helper::getFullUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Helper::getFullUrl方法的具体用法?PHP Helper::getFullUrl怎么用?PHP Helper::getFullUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Helper
的用法示例。
在下文中一共展示了Helper::getFullUrl方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionUpload
/**
* 文件上传
*/
public function actionUpload()
{
$uploader = new Uploader();
if (Yii::app()->request->isPostRequest) {
//断点上传
$uploader->initSimple('kindeditor')->uploadSimple('kindeditor_file');
$error = $uploader->getError();
if (!$error) {
//返回kindeditor接收的json格式
exit(CJSON::encode(array('error' => 0, 'url' => Helper::getFullUrl($uploader->file_path))));
} else {
exit(CJSON::encode(array('error' => 0, 'message' => $error)));
}
}
}
示例2: run
public function run()
{
$uploader = new Uploader();
if (Yii::app()->request->isPostRequest) {
//普通上传
$uploader->initSimple('album')->uploadSimple('simple_file');
$error = $uploader->getError();
if (!$error) {
$data = array('file_name' => $uploader->file_name, 'file_path' => $uploader->file_path, 'file_path_full' => Helper::getFullUrl($uploader->file_path), 'thumb_path' => $uploader->thumb_path, 'thumb_path_full' => Helper::getFullUrl($uploader->thumb_path), 'file_ext' => $uploader->file_ext);
App::response(200, 'success', $data);
} else {
App::response(101, $error);
}
}
}
示例3: run
public function run()
{
$uploader = new Uploader();
if (Yii::app()->request->isPostRequest) {
//断点上传
$uploader->initResumable('album')->uploadResumable('file');
$error = $uploader->getError();
if (!$error) {
$data = array('file_name' => $uploader->file_name, 'file_path' => $uploader->file_path, 'file_path_full' => Helper::getFullUrl($uploader->file_path), 'file_ext' => $uploader->file_ext);
App::response(200, 'success', $data);
} else {
App::response(101, $error);
}
} else {
//校验已上传的片段
$uploader->checkExistChunks();
}
}
示例4: foreach
?>
<?php
foreach ($imageList as $img) {
?>
<li>
<img src="<?php
echo Helper::getFullUrl($img);
?>
" width="100px" height="100px">
<input type="hidden" value="<?php
echo $img;
?>
" name="imagelist[]">
<div class="clear">
<a href="<?php
echo Helper::getFullUrl($img);
?>
" class="left" target="_blank">[查看]</a>
<a href="javascript:;" class="right" onclick="deleteFile(this)">[删除]</a>
</div>
</li>
<?php
}
?>
<?php
}
?>
</ul>
</td>
</tr>
示例5:
echo $row->id;
?>
"><?php
echo $row->id;
?>
</td>
<td>
<a href="<?php
echo Helper::getFullUrl($row->file_name);
?>
" target="_blank">
<?php
if (in_array($row->file_ext, array('jpg', 'png', 'bmp', 'gif'))) {
?>
<img src="<?php
echo Helper::getFullUrl($row->file_name);
?>
" alt="<?php
echo $row->real_name;
?>
" width="70" height="70" title="<?php
echo $row->real_name;
?>
"/>
<?php
} else {
?>
<?php
echo $row->real_name;
?>
<?php
示例6: foreach
?>
</th>
<th width="8%"><?php
echo Yii::t('admin', 'Operate');
?>
</th>
</tr>
</thead>
<?php
foreach ($datalist as $dk => $row) {
?>
<?php
$type = ModelType::model()->findByPk($row->type);
if ($type) {
$type_name = $type->type_name;
$view_url = Helper::getFullUrl($this->createUrl('/' . $type->type_key . '/view', array('id' => $row->content_id)));
} else {
$type_name = '未知';
$view_url = 'javascript:alert("数据错误");';
}
?>
<tr class="tb_list">
<td><input type="checkbox" name="id[]" value="<?php
echo $row->id;
?>
" /><?php
echo $row->id;
?>
</td>
<td><input name="sortOrder[<?php
echo $row->id;
示例7:
<td>
<input name="img_banner" id="special_banner" type="hidden" value="<?php
echo $model->img_banner;
?>
"/>
<input name="simple_file" id="fileupload_banner" onclick="fileUpload()" type="file" />
<div id="banner_preview">
<?php
if ($model->img_banner) {
?>
<a href="<?php
echo Helper::getFullUrl($model->img_banner);
?>
" target="_blank">
<img style="max-width: 900px; max-height: 300px; padding:5px; border:1px solid #cccccc;" src="<?php
echo Helper::getFullUrl($model->img_banner);
?>
" align="absmiddle" />
</a>
<?php
}
?>
</td>
</tr>
<!-- 专题简介 -->
<tr>
<td class="tb_title"><?php
echo $form->label($model, 'introduce');
?>
示例8: end
<?php
if ($model->video_file) {
?>
<li>
<span style="color:green"><?php
echo end(explode('/', $model->video_file));
?>
</span>
<input type="hidden" value="<?php
echo $model->video_file;
?>
" name="video_file">
<div class="clear">
<a href="<?php
echo Helper::getFullUrl($model->video_file);
?>
" class="left" target="_blank">[查看]</a>
<a href="javascript:;" class="right" onclick="deleteFile(this)">[删除]</a>
</div>
</li>
<?php
}
?>
</ul>
</td>
</tr>
<tr>
<td class="tb_title">
<?php
示例9: pathinfo
<?php
if ($model->soft_file) {
?>
<li>
<span style="color:green"><?php
echo pathinfo($model->soft_file, PATHINFO_BASENAME);
?>
</span>
<input type="hidden" value="<?php
echo $model->soft_file;
?>
" name="soft_file">
<div class="clear">
<a href="<?php
echo Helper::getFullUrl($model->soft_file);
?>
" class="left" target="_blank">[查看]</a>
<a href="javascript:;" class="right" onclick="deleteFile(this)">[删除]</a>
</div>
</li>
<?php
}
?>
</ul>
</td>
</tr>
<tr>
<td class="tb_title"><?php
echo $form->label($model, 'language');