上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页
摘要: /** * 删除文件缓存 */public function actionDelfilecache(){ $cachePath = Yii::getAlias('@app/runtime/cache');//文件绝对路径 $fileArray = scandir($cachePath);//将文件夹 阅读全文
posted @ 2017-08-01 10:19 py卡卡 阅读(401) 评论(0) 推荐(0) 编辑
摘要: <a href="<?=Url::to(['default/logout']);?>" title="退出"><span class="glyphicon glyphicon-log-out"></span></a> class DefaultController extends Controlle 阅读全文
posted @ 2017-08-01 10:12 py卡卡 阅读(231) 评论(0) 推荐(0) 编辑
摘要: <style>.file { position: relative; display: inline-block; background: #D0EEFF; border: 1px solid #99D3F5; border-radius: 4px; padding: 4px 12px; overf 阅读全文
posted @ 2017-07-31 17:58 py卡卡 阅读(987) 评论(0) 推荐(0) 编辑
摘要: /** * PHP生成缩略图 * @param $basepath /原文件地址 * @param $des_w /缩略图的宽 * @param $des_h /缩略图的高 * @param $style /规则名称 * @param $line /连接符 * @param int $save / 阅读全文
posted @ 2017-07-31 15:41 py卡卡 阅读(271) 评论(0) 推荐(0) 编辑
摘要: <input type="text" id = "textid" name="名称" value="值" size="文本框宽度" maxlength="最大字符长度"/> 1)disabled="true "文字会变成灰色,不可编辑,双击鼠标不可复制<input type="text" id = 阅读全文
posted @ 2017-07-31 15:18 py卡卡 阅读(651) 评论(0) 推荐(0) 编辑
摘要: yii2.0 中的ActiveForm 复选框的使用 默认的复选框选项为纵向的<?= $form->field($model, 'line')->checkboxList(Picture::$lines);?> 将复选框的选项改为横向的<?= $form->field($model, 'line') 阅读全文
posted @ 2017-07-24 11:06 py卡卡 阅读(4407) 评论(0) 推荐(0) 编辑
摘要: PHP实现文件的下载 点击链接down.php时执行文件的下载功能<a href='down.php'>文件下载</a> down.php<?php$filename = '路径+实际文件名'; //文件的类型 //其中的文件类型详见 http://www.jb51.net/article/2088 阅读全文
posted @ 2017-07-20 15:58 py卡卡 阅读(371) 评论(0) 推荐(0) 编辑
摘要: 文件上传时要统计上传的文件的大小,使用filesize('文件名')的时候,其中 的文件名就得是文件在本地的临时文件但是会出现一个错误显示成 filesize(): stat failed for D:\xampp\tmp\php64F.tmp所以要统计上传文件的大小就可以使用$_FILES 中的字 阅读全文
posted @ 2017-07-18 17:37 py卡卡 阅读(464) 评论(0) 推荐(0) 编辑
摘要: 在视图中创建复选框,列出复选框内的内容其中$id 为 列出在复选框中的数组 //$ids:所有要显示的checkbox(Array)<?=$form->field($model, 'id')->checkboxList($ids);?> 要将复选框设置默认值//$yuanId:默认选中的(Array 阅读全文
posted @ 2017-07-17 16:26 py卡卡 阅读(820) 评论(0) 推荐(0) 编辑
摘要: yii2 curl的使用办法 get: 当访问https是可能会出现空白需要将ssl设置为false $curl->setOption(CURLOPT_SSL_VERIFYPEER, false); post: // POST URL form-urlencoded // post 请求 , 数据格 阅读全文
posted @ 2017-07-11 09:16 py卡卡 阅读(6665) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 下一页