EOT; $htmlContent = preg_replace('/<\/head>/i', "$injectScript\n ", $htmlContent); } // 输出最终内容 echo $htmlContent; ?>