- 博客(6)
- 收藏
- 关注
原创 PHP生成图片,文字,以及合并图片以及文字
$desk_id = [];//这里的是生成二维码图片,为自己项目对应所需要的数据 //判断是否有该文件夹,并且有图片 $upload_dir = ENV::get('root_path') . 'public/uploads/qrcode/'.$val.'/'; if (!is_dir($upload_dir)) { //没有则创建 mkdir($upload_dir, 0755, true); } //有文件夹,查询是否有图片.
2020-06-11 12:02:19 639
原创 点击alert弹框不带IP地址
window.alert = function(name) {var iframe = document.createElement(“IFRAME”);iframe.style.display = “none”;iframe.setAttribute(“src”, ‘data:text/plain,’);document.documentElement.appendChild(iframe);window.frames[0].window.alert(name);iframe.parentNo
2020-06-11 11:33:59 1127 1
原创 jquery针对表单获取值的部分使用方法
下拉框获取选中的值来进行判断:#gettttype是给select定义ID$(’#getttype’).change(function () {var ttype = $(’#getttype option:selected’).val();if (ttype == ‘3’){$(’.do-recruit’).show();}else{$(’.do-recruit’).hide();}});通过form表单或者ajax提交需要获取对应的值直接获取select选中的值var bSele
2020-06-11 11:33:00 153
原创 PHP多表联查count重复的问题
多表联查count数据来进行统计,会出现重复的数据,这时候在查询中加上distinct来返回不同的值.DB::name(‘member’)->alias(‘a’)->field(‘count( distinct b.id) as followCount,count(distinct c.id) as articleCount,count(distinct d.id) as readBookCount,count(distinct e.id) as commentsCount’)->
2020-06-11 11:28:20 695
原创 TP5.1查询构造器使用find_in_set方法
查询构造器使用find_in_set$where[] = [’’,‘exp’,Db::raw(“FIND_IN_SET(‘参数’,‘查询val’)”)];
2020-06-11 11:24:00 2251 1
转载 TP多文件上传报错SplFileObject::__construct(/tmp/phpvfQPvQ):
tp5.1框架如果使用多个(2个都报错)file上传就会报错.分析:这个不是上传文件的最大值的问题,而是由于linux系统自动清除临时文件的愿意造成的thinkphp\library\think\File.php 的构造函数加个判断if(file_exists($filename))简单解决报错可以让你用起来不知道有没有其他其他不良影响(暂时没发现其他影响)public function __construct($filename, $mode = ‘r’){ if(file_exis
2020-06-11 11:21:49 796
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人