
php
草字
点点关注点点赞,私信问答先回复。
展开
-
js,php url中传参数存在中文乱码,encodeURI编码和decodeURI解码(js),urlencode编码和urldecode解码(php)。
如果在url链接中添加中文“https://www.aaa.com/task/task_publish?type=3&task_name=代买代办”,task_name的值为中文,生成二维码扫码之后,中文就会出现乱码,这个时候直接使用解码函数并不能解码还原成中文,所以我们需要在生成链接的时候,提前做好编码操作,然后在解码的时候才会生效。编码和解码:1.js对应函数:encodeURI编码和decodeURI解码(简单通用)encodeURI("众包快递"),编码中文后:%E4%BC%97原创 2021-04-09 15:02:07 · 981 阅读 · 0 评论 -
thinkphp3.2 判断大于等于,小于等于之类的。
标签 含义 eq或者 equal 等于 neq 或者notequal 不等于 gt 大于 egt 大于等于 lt 小于 elt 小于等于 heq 恒等于 nheq 不恒等于原创 2021-03-03 17:21:23 · 6231 阅读 · 1 评论 -
thinkphp3.2 判断当前时间是否在某个时间段之内
<if condition="time() egt strtotime($arr2['begin_time']) and time() lt strtotime($arr2['end_time'])"> {$arr2['begin_time']}-{$arr2['end_time']},增加运费{$arr2['money']}元;</if>原创 2020-12-10 10:13:49 · 1038 阅读 · 0 评论 -
php 将字符串以逗号拆分,把数组以逗号拼接
函数:explode()implode()$a='q,w,e';explode(',',$a); //['q','w','e'];原创 2020-12-01 16:11:19 · 2940 阅读 · 0 评论 -
think-php 解析html标签,转换html实体。
<div class="ck-content">{:htmlspecialchars_decode($data["voucher_detail"])}</div>原创 2020-12-01 16:07:58 · 765 阅读 · 0 评论 -
think-php判断数组包含值,存在值
<if condition="in_array(4,$deputy_config) eq true"> <button class="yellow_btn" data-state="5" data-power="4">撤单</button></if>原创 2020-12-01 16:06:57 · 1115 阅读 · 0 评论 -
php与html标签循环模板
<select name="" id="" class="select_notice_inventory"> <option value="">请选择</option> <?php foreach($inventoryList as $item){ ?> <option value="<?php echo $item['id']?>" <?php if($i原创 2020-09-14 14:13:14 · 708 阅读 · 0 评论