如何在codeigniter中添加google网站管理员验证html文件

时间:2017-07-20 09:29:10

标签: php codeigniter google-webmaster-tools

我是谷歌网站管理员工具的新手。 当我在网站管理员中添加一个属性时,它为我提供了一个 html 文件进行验证,并且还指示他们在服务器中上传文件。我做到了,但验证失败了。 我使用codeigniter完成了网站,我想知道在使用框架时是否有任何特定的位置上传文件。

1 个答案:

答案 0 :(得分:0)

如果您有一个布局视图页面,每次将其放入头部时都会加载。

离。我的位于views / template / layout.php

<html lang="en">
 <head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="<?php echo $description; ?>">
  <meta name="author" content="">
  <!google site verification -->
  <meta name="google-site-verification" content="" />
  <title><?php echo $title; ?></title>
  <!-- Google Analytics -->
  <script>
   (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', '', 'auto');
  ga('send', 'pageview');

  </script>
 </head>