![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PHP相关
约翰逊.铁蛋
默默努力
展开
-
安装PHPStudy报错500,和400
今天在项目中安装PHPstudy 报错是400和500 发现一个问题是新版本的PHPstudy在nginx 的vhost 文件会转义项目的路径。需要改成正确的。原创 2019-05-06 23:26:11 · 968 阅读 · 0 评论 -
Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable
在安装phpStudy后访问laravel项目时会报错Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable问题:使用PHPSTUDY时 报错原因:phpstudy默认开启的是php5.5版本解决方案:把php版本切换到5.6+就搞定了...原创 2019-05-07 12:34:25 · 8032 阅读 · 0 评论 -
php array_push 函数
array_push(resultarr,result_arr,resultarr,result_arr1,$result_arr2); 把1和2数组的内容压入 $result_arr将两个数组变成一个数组原创 2019-05-07 12:36:44 · 146 阅读 · 0 评论 -
laravel写where条件或者的关系
->where(function ($query) use ($uuid) { $query->where('teacher_uuid', $uuid)->orWhere('examiner_uuid', $uuid); })这个where条件保证了教师的uuid 或者考官的uuid...原创 2019-05-07 12:43:59 · 2834 阅读 · 0 评论 -
PHP根据身份证号码找出出生年月和判断男女
$card//身份证号码//找出出生年月 $brithday = substr($card,6,4)."-".substr($card,10,2)."-".substr($card,12,2); //判断男女 $sexa=substr($sex,-2,1); if($sexa%2==0){ $data['sex']='女'; ...原创 2019-05-07 12:53:03 · 2359 阅读 · 0 评论 -
Mysql order by 多字段排序
mysql单个字段降序排序:select * from table order by id desc;mysql单个字段升序排序:select * from table order by id asc;mysql多个字段排序:select * from table order by id desc,name desc;多字字段排序只需要添加多个排序条件,并且每个排序的条件之前用逗号分开...原创 2019-05-07 13:09:25 · 729 阅读 · 0 评论