0 Daumen
489 Aufrufe

Frage:

Warning: Illegal string offset 'subroot' in C:\xampp\htdocs\subroot.php on line 3

Code:

Hallo Allerseits,

habe Ihre wertvollen Informationen über das Internet www.stacklounge.de/1274/wie-bekomme-ich-einen-localhost-webseite erhalten. Die Installation war hervorragend. Ich habe alle meine php-, html-Member usw. in den Ordner C:\xampp\htdocs übertragen.

Beim Aufruf von localhost/index.html bekomme ich folgende Nachricht: You are not allowed to see the contents of this folder. Return to the home page.

Beim Aufruf von localhost/index.php bekomme ich folgende Nachrichten:

Warning: Illegal string offset 'subroot' in C:\xampp\htdocs\subroot.php on line 3

Warning: Cannot assign an empty string to a string offset in C:\xampp\htdocs\subroot.php on line 3

Warning: Illegal string offset 'subroot' in C:\xampp\htdocs\subroot.php on line 4

Subroot-Member:
<?php
@ini_set('error_reporting','2039');
$tngconfig['subroot'] = "";
$subroot = $tngconfig['subroot'] ? $tngconfig['subroot'] : "";
?>
*******************************************************************************
Warning: Illegal string offset 'subroot' in C:\xampp\htdocs\begin.php on line 6

begin-Member:

<?php
$cms = array();
if(isset($cms['support']) || isset($cms['tngpath']) || isset($_GET['lang']) || isset($_GET['mylanguage']) || isset($_GET['language']) || isset($_GET['session_language']) || isset($_GET['rootpath'])) die("Sorry!");
$tngconfig = "";
include("subroot.php");
include($tngconfig['subroot'] . "config.php");
$subroot = $tngconfig['subroot'] ? $tngconfig['subroot'] : $cms['tngpath'];
?>
********************************************************************************

Warning: Illegal string offset 'doctype' in C:\xampp\htdocs\config.php on line 45

Warning: Illegal string offset 'thumbcols' in C:\xampp\htdocs\config.php on line 71

Warning: Illegal string offset 'maxnoteprev' in C:\xampp\htdocs\config.php on line 72

config-Member: Zeile 45
$tngconfig['doctype'] = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\">";
Zeile 71 und 72
$tngconfig['thumbcols'] = "10";
$tngconfig['maxnoteprev'] = "350";

****************************************************************************************
Ich habe bewusst nur die ersten Warn-Meldungen zur Verfügung gestellt. Meine Webseite
habe ich nicht angezeigt bekommen. Wenn ich mich recht erinnere habe ich Administrator
für xampp angeklickt. Die Module stammen von der Software TNG Ahnenforschung (The next
Generation), welche ich legal erworben habe. Bei meinem Provider habe ich Schwierigkeiten
die Webseite anzulegen, deshalb weiche ich auf localhost aus.

Herzlichen Dank im Voraus für die Unterstützung und Beratung.

Viele Grüße sendet
PeZie
Avatar von

1 Antwort

+1 Daumen
Warning: Illegal string offset 'subroot' in C:\xampp\htdocs\subroot.php on line 3

...
$tngconfig['subroot'] = ""

Laut Fehlermeldung ist in der Variablen $tngconfig eine Zeichenkette gespeichert.

Laut Zeile 3 von subroot.php wird erwartet, dass in der Variablen $tngconfig ein Array gespeichert ist.

Ersetze

$tngconfig = "";
durch
$tngconfig = [];
in der Datei begin.php
Avatar von 5,6 k

Ein anderes Problem?

Stell deine Frage

Willkommen bei der Stacklounge! Stell deine Frage einfach und kostenlos

x
Made by a lovely community