Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 07:31

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



PHP Include fehler

Discussion on PHP Include fehler within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1


 
Philoy's Avatar
 
elite*gold: 52
Join Date: Oct 2012
Posts: 2,860
Received Thanks: 1,560
PHP Include fehler

Hey ich hab ein kleines Problem mit dem PHP Script.

Das habe ich über dem Doctype:

PHP Code:
<?php 

    $incl 
$_GET["incl"];

    if (
$incl == "" ) {$incl == "home";}


?>
Und das habe ich in meinem Content:

PHP Code:
<?php include('include/'.$incl.'.php'); ?>
So das alles klappt ja alles der switcht auch immer von Home auf etc.
Aber wenn ich die Seite ohne /home öffne kommt dieser Fehler.


Ich muss dann erstmal wieder auf Home klicken damit mir das nicht mehr angezeigt wird. Wie behebe ich das wenn die Seite leer ist home angezeigt wird ?
Philoy is offline  
Old 06/07/2014, 15:33   #2

 
~ JWonderpig ~'s Avatar
 
elite*gold: 60
Join Date: Sep 2013
Posts: 1,427
Received Thanks: 248
Bei einem Switch
PHP Code:
    default:
       
//Dein  Code 
~ JWonderpig ~ is offline  
Thanks
1 User
Old 06/07/2014, 15:53   #3


 
Philoy's Avatar
 
elite*gold: 52
Join Date: Oct 2012
Posts: 2,860
Received Thanks: 1,560
Quote:
Originally Posted by Caiv View Post
Bei einem Switch
PHP Code:
    default:
       
//Dein  Code 
Ich hab das nur in einem Tutorial gesehen, ich hab davon überhaupt 0 Ahnung.^^

#PROBLEM BEHOBEN.
Philoy is offline  
Old 06/07/2014, 15:57   #4
 
.StarSplash's Avatar
 
elite*gold: 74
The Black Market: 185/0/0
Join Date: Jul 2010
Posts: 13,408
Received Thanks: 3,943
{$incl == "home";}

== ist ein Vergleich.
= ist eine Zuweisung.
.StarSplash is offline  
Old 06/07/2014, 16:02   #5

 
~ JWonderpig ~'s Avatar
 
elite*gold: 60
Join Date: Sep 2013
Posts: 1,427
Received Thanks: 248


Einfach bei dem Switch anstatt $i $inc nehmen.
~ JWonderpig ~ is offline  
Old 06/07/2014, 16:04   #6
 
.StarSplash's Avatar
 
elite*gold: 74
The Black Market: 185/0/0
Join Date: Jul 2010
Posts: 13,408
Received Thanks: 3,943
PHP Code:
<?php
if(isset($_GET["incl"]))
{
   
$incl $_GET["incl"]; 
}
else
{
   
$incl "home";

?>
@Caiv: Die Variable existiert doch gar nicht.
.StarSplash is offline  
Old 06/07/2014, 16:15   #7

 
~ JWonderpig ~'s Avatar
 
elite*gold: 60
Join Date: Sep 2013
Posts: 1,427
Received Thanks: 248
Quote:
Originally Posted by .StarSplash View Post
PHP Code:
<?php
if(isset($_GET["incl"]))
{
   
$incl $_GET["incl"]; 
}
else
{
   
$incl "home";

?>
@Caiv: Die Variable existiert doch gar nicht.
Ich meine doch $incl
~ JWonderpig ~ is offline  
Reply


Similar Threads Similar Threads
[PHP]Dynamische Signatur [Include Fehler]
09/29/2013 - General Coding - 3 Replies
Guten Tag, Ich erstelle eine Signatur hiermit: Fülle das ganze dann mit String die ich per Mysql einlese header("Content-type: image/png"); $bg = imagecreatefrompng("signatur.png"); Allerdings wenn ich:
Include
02/25/2012 - Web Development - 6 Replies
<center> <body bgcolor="222222"> <h3> Die Seite wurde nicht gefunden... </h3> <img src="style/images/404/404.png" name="404_girl"> </center> <? include('include/wrapper.php') ?>
[GM] Include
11/10/2011 - SRO Private Server - 3 Replies
Hi when i Include in db.chars before my Nick im getting a session close can anyone help my pls?
File Include
10/23/2010 - AutoIt - 4 Replies
Heyy Leute ich hab ein kleines Problem... Ich wollte in meinen Autotyper + Autoklicker (Autotyper+Autoklicker by MagicDave) die Funktion FileInstall benutzen um die ganzen Bilder und Musiken direkt in das Script zu packen... Doch irgendwie funktioniert das nicht. Hier der kurze abschnitt meines FileInstall Codes Bitte um hilfe : $Musikk = FileExists(@ScriptDir & "\Musik\1.mp3") If $Musikk = 0 Then FileInstall("C:\Users\Anma44\Desktop\Autotype r by MagicDave\Musik\1.mp3" ,@ScriptDir &...



All times are GMT +2. The time now is 07:31.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.