SEOstats在服务器上给出错误

时间:2013-11-01 18:54:53

标签: php

当我在localhost上使用它时它工作得很好但是当我将相同的SEOstats-master目录移动到我的服务器时,它会在errorlog文件中出现以下错误并且浏览器页面变为空白。

  PHP Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/abctest/public_html/example.net/SEOstats-master/example/get-alexa-graphs.php on line 15

任何人都可以帮忙吗?

get-alexa-graphs.php中的代码是

 <?php
  /**
   * SEOstats Example - Get Alexa Traffic Metrics' Graphs
   *
   * @package    SEOstats
   * @author     Stephan Schmitz <eyecatchup@gmail.com>
   * @copyright  Copyright (c) 2010 - present Stephan Schmitz
   * @license    http://eyecatchup.mit-license.org/  MIT License
   * @updated    2013/08/17
   */

  // Bootstrap the library / register autoloader
  require_once (__DIR__ . '\..') . '\SEOstats\bootstrap.php';

  use \SEOstats\Services\Alexa as Alexa;

try {
$url = 'http://www.nahklick.de/';

// Create a new SEOstats instance.
$seostats = new \SEOstats\SEOstats;

// Bind the URL to the current SEOstats instance.
if ($seostats->setUrl($url)) {

    /**
     *  Print HTML code for the 'daily traffic trend'-graph.
     */
    echo Alexa::getTrafficGraph(1);

    /**
     *  Print HTML code for the 'daily pageviews (percent)'-graph.
     */
    echo Alexa::getTrafficGraph(2);

    /**
     *  Print HTML code for the 'daily pageviews per user'-graph.
     */
    echo Alexa::getTrafficGraph(3);

    /**
     *  Print HTML code for the 'time on site (in minutes)'-graph.
     */
    echo Alexa::getTrafficGraph(4);

    /**
     *  Print HTML code for the 'bounce rate (percent)'-graph.
     */
    echo Alexa::getTrafficGraph(5);

    /**
     *  Print HTML code for the 'search visits'-graph, using
     *  specific graph dimensions of 320*240 px.
     */
    echo Alexa::getTrafficGraph(6, false, 320, 240);
}
 }
  catch (\Exception $e) {
echo 'Caught SEOstatsException: ' .  $e->getMessage();
}

,第15行的代码是:

 use \SEOstats\Services\Alexa as Alexa; 

0 个答案:

没有答案