ueditor section标签丢失class和style样式问题
这是由于ueditor开启了xss过滤
修改ueditor.config.js
中whitList的section标签即可
同样,如img标签默认也无style
这是由于ueditor开启了xss过滤
修改ueditor.config.js
中whitList的section标签即可
同样,如img标签默认也无style
Let’s Encrypt 每次申请仅3个月有效期
更新命令:certbot renew
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
0 0 1 */2 * certbot renew --quiet --force-renewal
certbot安装yum -y install yum-utils
yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
执行certbot certonly
测试安装是否正确
PS:我也是随便复制的,只是想到了Let’s Encrypt的自动更新便百度了一下 :)
在复制微信的文章格式到ueditor时发现section标签中的style和class属性丢失,严重影响美观。
原因:ueditor中有xss过滤器,默认启用,按照配置文件中的白名单列表,不在其中的将去除。
解决:
修改ueditor文件中whiteList中找到section那项,把class和style加入白名单。
所有依赖都存在composer.json中,由于composer.json中相应库版本号未必为精确版本,所以同一份composer.json在不同时刻我们可能拉取到不同的依赖文件(默认拉取最新),从而可能导致问题。
当你执行composer update的时候,composer会去读取composer.json中指定的依赖,去分析他们,并且去拉取符合条件最新版本的依赖。然后他会把所拉取到的依赖放入vendor目录下,并且把所有拉取的依赖的精确版本号写入composer.lock文件中。
composer install所执行的事情非常类似,只在第一步的时候有差别。当你本地如果已经存在一份composer.lock时,它将会去读取你的composer.lock而非composer.json,并且以此为标准去下载依赖。当你本地没有composer.lock的时候,它所做的事情和composer update其实并没有区别。
可指定依赖更新,如 composer update monolog/monolog
解决:https://github.com/ramsey/uuid/issues/153
This is correct. Some of the math involved when dealing with UUIDs is impossible on 32-bit systems. This is because a UUID is an unsigned 128-bit integer, and the time portion of a version 1 UUID is an unsigned 64-bit number. PHP on a 32-bit system only supports signed integers up to 2147483647
.
Installing the moontoast/math library should fix your issue:
composer require moontoast/math
错误信息
`SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #3
of SELECT list is not in GROUP BY clause and contains nonaggregated column
'iicityYii.opportunity_conditions.money' which is not functionally dependent
on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by`
select @@global.sql_mode
set @@global.sql_mode ='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
或者:SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
或者,修改mysql配置文件,新增
[mysqld]
sql-mode=""
ThinkPHP5 自定义模版标签tablib
新建文件application/common/taglib/Diy.php
Diy.php
<?php
// +----------------------------------------------------------------------
// | 自定义模版标签
// +----------------------------------------------------------------------
// | Author: SenSen <1050575278> 2018-12
// +----------------------------------------------------------------------
namespace app\common\taglib;
use think\Db;
use think\template\TagLib;
class Sen extends TagLib
{
protected $tags = [
'arclist' => ['attr'=> 'field,id,limit,cid,order,name,flag,type', 'close'=>1],
'show' => ['attr'=> 'title,field', 'close'=>0],
];
/**
* 文章标签
* @param $tag
* @param $content
* @return string
*/
public function tagArclist($tag, $content)
{
$id = isset($tag['id']) ? $tag['id'] : 'vo';
$order = empty($tag['order']) ? "'id DESC'" : '"'.$tag['order'].'"';
$name = 'article';
$field = "''";
if (!empty($tag['field'])) {
if (strpos($tag['field'], '$') === 0) {
$field = $tag['field'];
$this->autoBuildVar($field);
} else {
$field = "'{$tag['field']}'";
}
}
$cid = "''";
if (!empty($tag['cid'])) {
if (strpos($tag['cid'], '$') === 0) {
$cid = $tag['cid'];
$this->autoBuildVar($cid);
} else {
$cid = "'{$tag['cid']}'";
}
}
$flag = "''";
if (!empty($tag['flag'])) {
if (strpos($tag['flag'], '$') === 0) {
$flag = $tag['flag'];
$this->autoBuildVar($flag);
} else {
$flag = "'{$tag['flag']}'";
}
}
$type = "''";
if (!empty($tag['type'])) {
if (strpos($tag['type'], '$') === 0) {
$type = $tag['type'];
$this->autoBuildVar($type);
} else {
$type = "'{$tag['type']}'";
}
}
$limit = "''";
if (!empty($tag['limit'])) {
if (strpos($tag['limit'], '$') === 0) {
$limit = $tag['limit'];
$this->autoBuildVar($limit);
} else {
$limit = "'{$tag['limit']}'";
}
}else{
$limit = '0,6';
}
$parse = <<<parse
<?php
\$$name = \app\common\model\Article::tagArticle([
'field' => {$field},
'cid'=>{$cid},
'limit'=>{$limit},
'flag'=>{$flag},
'type'=>{$type},
'order'=>{$order}
]);
?>
{volist name="{$name}" id="{$id}"}
{$content}
{/volist}
parse;
return $parse;
}
/**
* 广告标签
* @param $tag
* @return mixed
*/
public function tagShow($tag)
{
$title = $tag['title'] ? $tag['title'] : '';
$result = Db::name('ad')->where(['tag'=>$title, 'status'=>1])->find();
return $result['content'];
}
}
升级编译参数
./configure --prefix=/usr/local/php56 \
--with-config-file-path=/usr/local/php56/etc \
--with-bz2 \
--with-curl \
--enable-ftp \
--enable-sockets \
--disable-ipv6 \
--with-gd \
--with-jpeg-dir=/usr/local \
--with-png-dir=/usr/local \
--with-freetype-dir=/usr/local \
--enable-gd-native-ttf \
--with-iconv-dir=/usr/local \
--enable-mbstring \
--enable-calendar \
--with-gettext \
--with-ldap \
--with-libxml-dir=/usr/local \
--with-zlib \
--with-pdo-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-mysql=mysqlnd \
--enable-dom \
--enable-xml \
--enable-fpm \
--enable-bcmath \
--enable-pcntl \
--with-mhash \
--enable-zip \
--with-openssl \
--enable-opcache \
--with-pear \
--with-apxs2=/usr/local/apache2/bin/apxs