Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何在codeigniter中添加google站长验证html文件_Php_Codeigniter_Google Webmaster Tools - Fatal编程技术网

Php 如何在codeigniter中添加google站长验证html文件

Php 如何在codeigniter中添加google站长验证html文件,php,codeigniter,google-webmaster-tools,Php,Codeigniter,Google Webmaster Tools,我是谷歌网站管理员工具的新手。 当我在webmaster中添加一个属性时,它为我提供了一个html文件以供验证,并且他们还指示在服务器中上载该文件。我这样做了,但是验证失败了。 我使用codeigniter创建了网站,我想知道在使用框架时是否有任何特定的位置可以上载文件。如果您有一个布局视图页面,每次将其放在头部时都会加载该页面 例如,mine位于views/template/layout.php中 <html lang="en"> <head> <meta

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

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

例如,mine位于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>


请下载搜索控制台验证页面提供的验证文件并上传至公众_html@JobyMathews将提供的文件放在Codeigniter的根目录index.php中,并将robots.txt放在其中,以便Googlebot阅读您的网站。有关robots.txt的更多信息,我在public_html中上传了它,但它显示了错误