作者 lyh

gxAiblog自动发布

... ... @@ -63,7 +63,12 @@ class lyhDemo extends Command
//查看当前是否包含句号。
$result = $this->hasAnyPeriod($item['seo_description']);
if($result === false){
$text = $this->trimToLastFullWord($item['seo_description']);
$res = $this->hasPeriod($item['seo_description']);
if($res === false){
$text = $this->trimToLastFullWord($item['seo_description']);
}else{
$text = substr($item['seo_description'], 0, strrpos($item['seo_description'], ',')).'.';
}
}else{
$arr = explode('.',$item['seo_description']);
$text = $arr[0].'.';
... ... @@ -91,4 +96,7 @@ class lyhDemo extends Command
public function hasAnyPeriod($text) {
return strpos($text, '.') !== false || mb_strpos($text, '。') !== false;
}
public function hasPeriod($text) {
return strpos($text, ',') !== false;
}
}
... ...
... ... @@ -184,11 +184,11 @@ class BaseLogic extends Logic
//自建站服务器直接返回
return $this->success();
}
if($serversIpInfo && ($serversIpInfo['servers_id'] != 1)){//TODO::当前项目通知不过 ,跳过自动更新
exec('curl -k "'.$url.'" > /dev/null 2>&1 &');
}else{
// if($serversIpInfo && ($serversIpInfo['servers_id'] != 1)){//TODO::当前项目通知不过 ,跳过自动更新
// exec('curl -k "'.$url.'" > /dev/null 2>&1 &');
// }else{
shell_exec('curl -k "'.$url.'"');
}
// }
return $this->success();
}
... ...