随笔分类 - PHP
摘要:thinkphp 数据嵌套输出 $list=Db::name('a')->field('id,xxx,...')->group('rwid')->select(); $data['list']=[]; foreach ( $list as $v){ $part=Db::name('a')->fiel
阅读全文
摘要:PHP保存$data = preg_replace("/[\r\n]+/", '##', $a); //将回车键替换##保存JS 读取 var str1 = ldata.data.replace(/##/g,"\n"); //将数据##替换成回车显示
阅读全文
摘要:PHP: $b=preg_replace("/[\r\n]+/", '##', $a)将变量a中的换行符替换为## $str=$data;$order=array("\r\n","\n","\r");$replace='<br/>';$newstr=str_replace($order,$repla
阅读全文
摘要:window.location.href="{:url('Index/index')}>"+"/ID/"+ID; //这样可以生成,但url模式改变则不能用 window.location.href="{:url('Index/index','ID=" + ID+ "')}" //解析不成功。 wi
阅读全文
摘要:$image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAAEiCAYAAABdvt+2AAAgAElEQVR4Xuy9B5hlV3Wm/Z58bq6cujpVB3WUWlJ308oERSQMCAVAAkQQYoi2sQcMAzOD5zcG
阅读全文
摘要:<?phpnamespace app\admin\controller;use think\Controller;class Test extends controller{ const name='PHP软件开发工程师'; private $a='1'; public function index
阅读全文
摘要: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 ]
阅读全文
摘要:PHP 加密: base64_encode(str_replace(" ","+","工资情况")) 解密: base64_decode(str_replace(" ","+","工资情况"));thinkphp {$vo.ctname|base64_encode}
阅读全文
摘要:/** * 二维数组按指定的键值排序 * @param $array 需要排序的二维数组 * @param $keys 需要排序根据的索引 * @param string $type 正序/倒叙(默认倒序) * @return array|string */public function array
阅读全文