• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Kann fehler in der conifg.php nicht finden

Status
Für weitere Antworten geschlossen.

Darksoldier7

Aktives Mitglied
hier is der code von meiner config.php:
[php:1:2f06ff7139]<?php
//Konfiguration
$url = "http://darksoldier7.da.funpic.de/chilee";
$right = "&copy; by Patrick \"BlacKT\" Ziegler in Coorperation with Lars 'Chilee' Axtmann";
//configende
switch($chilee){
case "home": include("$url/inc/home.php");break;
case "boutme": include("$url/inc/boutme.php");break;
case "hardware": include("$url/inc/hardware.php");break;
case "kontakt": include("$url/inc/contact.php");break;
case "impressum": include("$url/inc/impressum.php");break;
//Home:
case "downloads": include("$url/inc/upt/downloads.php");break;
case "pics": include("$url/inc/upt/pics.php");break;
case "links": include("$url/inc/upt/links.php");break;
//About Me:
case "knowledge": include("$url/inc/upt/know.php");break;
case "friends": include("$url/inc/upt/friends.php");break;
case "games": include("$url/inc/upt/games.php");break;
//Hardware:
case "sound": include("$url/inc/upt/sound.php");break;
case "ICQ": include("$url/inc/upt/icq.php");break;
default: include("$url/inc/home.php"); break;
}
?>[/php:1:2f06ff7139]

Und hier is das zu betrachten:
http://darksoldier7.da.funpic.de/chilee/index.php

warum funktioniert das nicht?? es wird nicht das includet wo es sollte -.-
 
Werbung:
php unterstützt er...
aber WO is da der fehler?
davor kam immer was von unexpectet $ on line 24, dann hab ich bemerkt dass da die geschweifte Klammer zu fehlt...
und jetzt isses so... manmanman und BlackT antwortet mir in ICQ net^^
EDIT:
Kann es vll dran liegen dass es eine config.inc und net config.php is??
 
Werbung:
die dinger sind anscheindend für switch...
...das problem hatte ich auch mal und hab' dann nachgefragt. wenn du eine datei die switch enthält, includest, funzt die funktion nicht mehr. frag nicht warum, aber irgendetwas geht da mit dem pfad schief...

Nils aka XraYSoLo

EDIT:
Andre schrieb:
Probiers doch aus

das muss man nicht ausprobieren, das weiß man. dem script ist es egal, wie die endung der zu includeten datei ist.
 
Werbung:
Werbung:
wenn du auf vars aus der adresszeile zugreifst muss du das über $_GET['var_name'] machen du greifst jedoch einfach mit $var_name drauf zu das ist falsch
 
hast dus auch includet ? ich mein am anfang der index:

[php:1:7d8090e099]
<?

include ("config.inc");

?>
[/php:1:7d8090e099]
 
Werbung:
ja -.-
[php:1:5adedc0a82]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script language="javascript">
function over(imgname,imgsrc) {
document[imgname].src=imgsrc;
}
</script>
<title>Chilee - The Homepage</title>
<meta name="generator" content="Scribe! 2 [http://scribe.de]">
<link href="data/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<table style="border: 1px solid #666666" width="902" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td valign="bottom" height="220"background="data/banner.gif"></td>
</tr>
<tr>
<td valign="top" background="data/img/bd_base.gif">

<? include("data/config.inc.php") ?></p>
</td>
</tr>
<tr bgcolor="#CCCCCC">
<td height="13" background="data/img/tb_line.gif" bgcolor="#1C1D28" style="border-top: 1px solid #666666"><? echo $right ?></td>
</tr>
</table>


</p>
<p align="center">





</p>
</body>
</html>
[/php:1:5adedc0a82]
 
[php:1:670dd5f480]<?php
//Konfiguration
$url = "http://darksoldier7.da.funpic.de/chilee";
$right = "&copy; by Patrick \"BlacKT\" Ziegler in Coorperation with Lars 'Chilee' Axtmann";
//configende
switch($_GET['chilee']){
case "home": include("$url/inc/home.php");break;
case "boutme": include("$url/inc/boutme.php");break;
case "hardware": include("$url/inc/hardware.php");break;
case "kontakt": include("$url/inc/contact.php");break;
case "impressum": include("$url/inc/impressum.php");break;
//Home:
case "downloads": include("$url/inc/upt/downloads.php");break;
case "pics": include("$url/inc/upt/pics.php");break;
case "links": include("$url/inc/upt/links.php");break;
//About Me:
case "knowledge": include("$url/inc/upt/know.php");break;
case "friends": include("$url/inc/upt/friends.php");break;
case "games": include("$url/inc/upt/games.php");break;
//Hardware:
case "sound": include("$url/inc/upt/sound.php");break;
case "ICQ": include("$url/inc/upt/icq.php");break;
default: include("$url/inc/home.php"); break;
}
?> [/php:1:670dd5f480]

:roll:
 
aber daran liegt es nicht....
kann ich mir ned vorstellen

Doch!!!

Es liegt an register globals off!!!!

Nimm den Get Code von Prophet dann gehts
 
Werbung:
wenn es includet wird, kann die endung egal sein. include mal 'ne datei, die "file.fgsdakfgadskfa" heißt und php enthält, die wird so oder so ausgeführt (ich habs nämlich schon probiert und es geht).

Nils aka XraYSoLo
 
Werbung:
und wieso sollte sie nicht? sie wird in eine bestehende php-file eingebunden und ist somit teil von der.
also bei mir gehts.

Nils aka XraYSoLo
 
Status
Für weitere Antworten geschlossen.
Zurück
Oben