作者 lyh
... ... @@ -140,7 +140,7 @@ class UpdateSeoTdk extends Command
ProjectServer::useProject($project_id);
$this->seo_tdk($project_id);
} catch (\Exception $e) {
echo date('Y-m-d H:i:s') . ' error: ' . $project_id . '->' . $e->getMessage() . PHP_EOL;
echo date('Y-m-d H:i:s') . ' line '. $e->getLine() .' error: ' . $project_id . '->' . $e->getMessage() . PHP_EOL;
}
echo date('Y-m-d H:i:s') . ' end: ' . $project_id . PHP_EOL;
}
... ... @@ -289,7 +289,7 @@ class UpdateSeoTdk extends Command
$projectOptimizeModel = new DeployOptimize();
$info = $projectOptimizeModel->read(['project_id' => $project_id], ['id', 'main_keywords']);
if (!empty($info['main_keywords'])) {
$main_keywords = explode(',', $info['main_keywords']);
$main_keywords = explode(PHP_EOL, $info['main_keywords']);
//随机取
shuffle($main_keywords);
$main_keywords = array_slice($main_keywords, 0, $num);
... ...