随笔分类 -  PHP

摘要:thinkphp 数据嵌套输出 $list=Db::name('a')->field('id,xxx,...')->group('rwid')->select(); $data['list']=[]; foreach ( $list as $v){ $part=Db::name('a')->fiel 阅读全文
posted @ 2023-03-05 00:28 85541585 阅读(48) 评论(0) 推荐(0) 编辑
摘要:PHP保存$data = preg_replace("/[\r\n]+/", '##', $a); //将回车键替换##保存JS 读取 var str1 = ldata.data.replace(/##/g,"\n"); //将数据##替换成回车显示 阅读全文
posted @ 2023-02-17 10:45 85541585 阅读(44) 评论(0) 推荐(0) 编辑
摘要:PHP: $b=preg_replace("/[\r\n]+/", '##', $a)将变量a中的换行符替换为## $str=$data;$order=array("\r\n","\n","\r");$replace='<br/>';$newstr=str_replace($order,$repla 阅读全文
posted @ 2021-04-26 22:06 85541585 阅读(302) 评论(0) 推荐(0) 编辑
摘要:window.location.href="{:url('Index/index')}>"+"/ID/"+ID; //这样可以生成,但url模式改变则不能用 window.location.href="{:url('Index/index','ID=" + ID+ "')}" //解析不成功。 wi 阅读全文
posted @ 2020-11-22 17:40 85541585 阅读(477) 评论(0) 推荐(0) 编辑
摘要:$image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAAEiCAYAAABdvt+2AAAgAElEQVR4Xuy9B5hlV3Wm/Z58bq6cujpVB3WUWlJ308oERSQMCAVAAkQQYoi2sQcMAzOD5zcG 阅读全文
posted @ 2020-10-04 22:45 85541585 阅读(1396) 评论(0) 推荐(0) 编辑
摘要:<?phpnamespace app\admin\controller;use think\Controller;class Test extends controller{ const name='PHP软件开发工程师'; private $a='1'; public function index 阅读全文
posted @ 2020-02-05 12:55 85541585 阅读(379) 评论(0) 推荐(0) 编辑
摘要:1.json_decode() json_decode (PHP 5 >= 5.2.0, PECL json >= 1.2.0) json_decode — 对 JSON 格式的字符串进行编码 说明 mixed json_decode ( string $json [, bool $assoc ] 阅读全文
posted @ 2020-02-04 20:03 85541585 阅读(744) 评论(0) 推荐(0) 编辑
摘要:PHP 加密: base64_encode(str_replace(" ","+","工资情况")) 解密: base64_decode(str_replace(" ","+","工资情况"));thinkphp {$vo.ctname|base64_encode} 阅读全文
posted @ 2019-01-23 09:47 85541585 阅读(465) 评论(0) 推荐(0) 编辑
摘要:/** * 二维数组按指定的键值排序 * @param $array 需要排序的二维数组 * @param $keys 需要排序根据的索引 * @param string $type 正序/倒叙(默认倒序) * @return array|string */public function array 阅读全文
posted @ 2018-11-08 11:00 85541585 阅读(1320) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示