Hallo liebe Wissende,
ich hab da mal ein Problem, und zwar möchte ich neben der Original counter.php (die ich so auf einer meiner Webseiten eingebunden habe) zusätzlich eine einfache Textversion haben, a la:
"Besucher heute: 1 • Tagesrekord: 95 • Gesamt: 20170• ..."
Also habe ich eine weitere Counterdatei (altcounter.php) erstellt und versucht diese entsprechend zu füllen (wobei ich die Wertevariablen aus der counter.php gezogen habe:
Code (PHP):<?php
##### Einstellungen ###########################################################################
if ($_SESSION["language"] == "en") {
$txtonline = "Online: "; // Text before the active number of visitors
$txttoday = "Visitor today: "; // Text before the number of visitors of the today's daily
$txtyesterday = "Yesterday: "; // Text before the number of visitors of the day before
$txtrecord = "Daily record: "; // Text before the daily record
$txtweek = "Week: "; // Text before the number of visitors this week
$txtlastweek = "Last week: "; // Text before the number of visitors of the last week
$txtmonth = "Month: "; // Text before the number of visitors in this month
$txtlastmonth = "Last month: "; // Text before the number of visitors of the last month
$txtyear = "Year: "; // Text before the number of visitors in this year
$txtlastyear = "Last year: "; // Text before the number of visitors in the last year
$txtaverage = "Daily average: "; // Text before the number of total visitors
$txttotal = "Total: "; // Text before the number of total visitors
$txtpagestotal = "Page hits: "; // Text before the hints
$dateform1 = "Y/m/d";
$dateform2 = "y/m/d";
}
else {
$txtonline = "Online: "; // Text vor der aktiven Besucheranzahl
$txttoday = "Besucher heute: "; // Text vor der Besucheranzahl des heutigen Tages
$txtyesterday = "Vortag: "; // Text vor der Besucheranzahl des Vortages
$txtrecord = "Tagesrekord: "; // Text vor dem Tagesrekord
$txtweek = "Woche: "; // Text vor der Besucheranzahl in dieser Woche
$txtlastweek = "Vorwoche: "; // Text vor der Besucheranzahl der letzten Woche
$txtmonth = "Monat: "; // Text vor der Besucheranzahl in diesem Monat
$txtlastmonth = "Vormonat: "; // Text vor der Besucheranzahl des letzten Monats
$txtyear = "Jahr: "; // Text vor der Besucheranzahl in diesem Jahr
$txtlastyear = "Vorjahr: "; // Text vor der Besucheranzahl im letzten Jahr
$txtaverage = "Tagesdurchschnitt: "; // Text vor dem Tagesdurchschnitt
$txttotal = "Gesamt: "; // Text vor der Gesamtbesucheranzahl
$txtpagestotal = "Seitenaufrufe: "; // Text vor den Seitenklicks
$dateform1 = "d.m.Y";
$dateform2 = "d.m.y";
}
$splitter = " • "; // Statistiktrennung
$bv = " <b>"; // HTML-Tag VOR der Counterzahl
$bh = "</b> "; // HTML-Tag NACH der Counterzahl
###############################################################################################
//------------------------------------------------------------------------------
error_reporting(0);
@ini_set ( "max_execution_time","false" ); // set the script time
include ( "config/config.php" ); // include path to logfile
include ( "log/cache_visitors_counter.php");
if ( $db_active == 1 )
{
include ( "config/config_db.php" ); // include db prefix
include ( "db_connect.php" ); // include database connectivity
}
//-------------------------------
if ( $counter_display_show_visitors_online == 1 ) { $counting .= $txtonline.$bv. number_format ( $module1 , 0 , "," , "." ) .$bh.$splitter; }
if ( $counter_display_show_today == 1 ) { $counting .= $txttoday.$bv. number_format ( $module2 , 0 , "," , "." ) .$bh.$splitter; }
if ( $counter_display_show_yesterday == 1 ) { $counting .= $txtyesterday.$bv. number_format ( $module3 , 0 , "," , "." ). $bh.$splitter; }
if ( $counter_display_show_this_month == 1 ) { $counting .= $txtmonth.$bv. number_format ( $module4 , 0 , "," , "." ). $bh.$splitter; }
if ( $counter_display_show_last_month == 1 ) { $counting .= $txtlastmonth.$bv. number_format ( $module5 , 0 , "," , "." ). $bh.$splitter; }
if ( $counter_display_show_max == 1 ) { $counting .= $txtrecord.$bv. number_format ( $module6 , 0 , "," , "." ). $bh.$splitter; }
if ( $counter_display_show_average == 1 ) { $counting .= $txtaverage.$bv. .number_format ( $module7 , 0 , "," , "." ). $bh.$splitter; }
if ( $counter_display_show_total == 1 ) { $counting .= $txttotal.$bv. number_format ( ($module8+$counter_add_visitors) , 0 , "," , "." ). $bh.$splitter; }
echo $counting;
?>
Aber, das einzige, was ich zu sehen bekomme ist eine weiße Seite...
Da meine PHP-Kenntnisse beschränkt sind und mir soweit alles richtig erscheint, kann ich den Fehler nicht erkennen, weshalb ich denke, daß mit da ein ganz entscheidender Codeteil fehlt
Könnt ihr mir helfen???
Webstat-Version ist 4.9.15
PHP-Version ist 5.6.21-1+donate.sury.org~trusty+1
LG Baerchen