导入表格,里面的日期格式换转成数字
$time = intval(($a - 25569) 3600 24); //转换成1970年以来的秒数($a是日期那栏的值)
$date = date('Y-m-d H:i:s', $time);
$time = intval(($a - 25569) 3600 24); //转换成1970年以来的秒数($a是日期那栏的值)
$date = date('Y-m-d H:i:s', $time);
图片有点大,10M左右,超过十秒就报超时了,王编辑器里有个参(看public里引用的是哪个js),在引用的这个配置文件里有个参uploadImgTimeout,默认是1e4(毫秒的,10的四次方,即10秒),改为1e6即可(100秒)
1、thinkphp\library\think\Request.php
public function method($method = false)改为
public function method($method = false)
{
if (true === $method) {
// 获取原始请求类型
return $this->server('REQUEST_METHOD') ?: 'GET';
} elseif (!$this->method) {
if (isset($_POST[Config::get('var_method')])) {
$method = strtoupper($_POST[Config::get('var_method')]);
if (in_array($method, ['GET', 'POST', 'DELETE', 'PUT', 'PATCH'])) {
$this->method = $method;
$this->{$this->method}($_POST);
} else {
$this->method = 'POST';
}
unset($_POST[Config::get('var_method')]);
} elseif (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {
$this->method = strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);
} else {
$this->method = $this->server('REQUEST_METHOD') ?: 'GET';
}
}
return $this->method;
}2、thinkphp\library\think\App.php
public static function module(
// 获取控制器名
$controller = strip_tags($result[1] ?: $config['default_controller']);改为
// 获取控制器名
$controller = strip_tags($result[1] ?: $config['default_controller']);
if (!preg_match('/^[A-Za-z](\w|\.)*$/', $controller)) {
throw new HttpException(404, 'controller not exists:' . $controller);
}3、thinkphp\library\think\Route.php
public static function parseUrl
// 解析控制器
$controller = !empty($path) ? array_shift($path) : null;
}改为
// 解析控制器
$controller = !empty($path) ? array_shift($path) : null;
}
if ($controller && !preg_match('/^[A-Za-z](\w|\.)*$/', $controller)) {
throw new HttpException(404, 'controller not exists:' . $controller);
}
宝塔之前用的阿里云的证书,到期了,换成自带的或者续一下,保存的时候报这个错BIO_new_file failed,如果以前是好的,这个时候只需要关闭ssl,然后再重启下Nginx,然后再申请就好了
拿到接口返回的数据,赋值给数组A,再赋值给数组B,这时候不论改A的值还是B的值,这俩都会同步变动,小程序里这样赋值貌似是值的传递,所以导致同步了,只需要赋值给B的时候先转成字符串再转回来就行了(真tm变态。。。)。如下:
this.setData({
aaa: resdata,
//变态一下
bbb: JSON.parse(JSON.stringify(resdata))
})