返回数据:安卓机数据为string,ios为object,但是直接转换object,失败,还是string。
查了之后发现是/ufeff的问题,去掉就好了
安卓是string,判断不是object就去掉再转
代码如下:
...
php+mysql优化order by rand() 使用JOIN 进行渲染优化
select t1.id,t1.title from YC_news AS t1 JOIN ( select round( rand() * ( select max(id) from YC_news ) ) as id ) as t2 where t1.id >= t2.id order by t1.id asc limit&...
php 一次性替换多个关键词
【php】KindEditor 4.1.11 图片上传时自动添加图片水印
1.打开编辑器目录下的php/upload_json.php文件(注意需开启: PHP的Support GD 2.0,Support FreeType、GIF Read、GIF Create、JPG 、PNG)
2.判断是否有这个文件夹没有则自动创建
//文件保存目录路径
$save_path = '../../../u...
使用微信小程序扩展库userExtendedLib的方式引用weui前端样式库
httpd.ini 伪静态规则
.htaccess 伪静态规则--内容如下:
[ISAPI_Rewrite]
# 3600 = 1 hour
CacheClockRate 3600
RepeatLimit 32
# Protect httpd.ini and httpd.parse.errors files
# from accessing thr...
web.config 伪静态规则
web.config伪静态规则
rule1至rule1.... 要按顺序下去
内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web...
.htaccess 伪静态规则
.htaccess 伪静态规则--内容如下:
# 将 RewriteEngine 模式打开
RewriteEngine On
# Rewrite 系统规则请勿修改
RewriteRule ^index\.html$ index.php
RewriteRule ^news\.html$ news.php
R...
css强制换行显示省略号之显示两行后显示省略号
1,首先来一个固定宽度,在一行显示,超出隐藏,显示省略号的样式
display:block;
white-space:nowrap;
overflow:hidden;
text-overflow:ellipsis;
2,其实来一个可以设置让它显示多少行后再显示省略号,这只能用私有属性解决了
text-overflow: -o-ellipsis-lastl...
php批量修改内容:批量修改分类名和排序ID
流程:
1.给每个复选框checkbox赋值num,num每次自增1,并在该复选框的name 自定义一个名 比如 name="num[]"
2.任意位置插入全选的js代码段
<script>
function CheckAll(form) {
for (var i=0;i<form.elem...