Toon posts:

[php] Klein foutje in script, kzie alleen niet wat :|

Pagina: 1
Acties:
  • 59 views sinds 30-01-2008

Verwijderd

Topicstarter
ik heb gewoon een simpel pagina'tje gemaakt in php

http://212.187.89.36:8080/

zie de fout op de main page...Ik heb er dit script voor gebruikt, alleen ik zie niet in waarom dit niet zou werken...

<?php
$title = "";
if ($pag == "") {
$pag = "home";
$title = "Home";
}

if ($pag == "home") { $title = "Home"; }
if ($pag == "news") { $title = "News"; }
if ($pag == "contact") { $title = "Contact"; }
if ($pag == "crew") { $title = "Crew"; }
if ($pag == "tflash") { $title = "Tutorials: Flash"; }
if ($pag == "tphotoshop") { $title = "Tutorials: Adobe Photoshop"; }
if ($pag == "thtml") { $title = "Tutorials: HTML"; }
if ($pag == "tjavascript") { $title = "Tutorials: JavaScript"; }
if ($pag == "tdreamweaver") { $title = "Tutorials: Dreamweaver"; }
if ($pag == "tcss") { $title = "Tutorials: CSS"; }
if ($pag == "ebuttons") { $title = "Examples: Buttons"; }
if ($pag == "ebanners") { $title = "Examples: Banners"; }
if ($pag == "ewallpapers") { $title = "Examples: Wallpapers"; }
if ($pag == "escripts") { $title = "Examples: Scripts"; }
if ($pag == "eflash") { $title = "Examples: Flash"; }
if ($pag == "fbuttons") { $title = "Free Samples: Buttons"; }
if ($pag == "fbanners") { $title = "Free Samples: Banners"; }
if ($pag == "fwallpapers") { $title = "Free Samples: Wallpapers"; }
if ($pag == "fflash") { $title = "Free Samples: Flash"; }
if ($pag == "sjavascript") { $title = "Scripts: JavaScript"; }
if ($pag == "shtml") { $title = "Scripts: HTML"; }
if ($pag == "sdhtml") { $title = "Scripts: DHTML"; }
if ($pag == "sasp") { $title = "Scripts: ASP"; }
if ($pag == "sxml") { $title = "Scripts: XML"; }
if ($pag == "sjavaapplets") { $title = "Scripts: Java Applets"; }
if ($pag == "sphp") { $title = "Scripts: PHP"; }
if ($pag == "schtml") { $title = "Scripts: cHTML"; }
if ($pag == "swml") { $title = "Scripts: WML"; }
if ($pag == "disclaimer") { $title = "Disclaimer"; }
if ($pag == "affiliates") { $title = "Affiliates"; }
if ($pag == "statistics") { $title = "Statistics"; }
?><html>
<head>
<title>PTS - <?php echo $title ?></title>
<style type="text/css">
A {color:#FFE000;text-decoration:none}
A:Hover {color:#FFFFFF;text-decoration:none}
Body {font-family:Verdana; font-size:10pt; color:#FFC000; background:#BB0000}
</style>
</head>
<body>
<center><font style="font-size:24pt;font-weight:bold"><?php echo $title ?></font></center><br><br>

<?php
if (!file_exists($pag.".php")) {
echo "<center>I'm sorry, but the page you've requested doesn't exist.</center>";
}
else {
include($pag.".php");
}
?>
</body>
</html>

  • Thijsmans
  • Registratie: Juli 2001
  • Laatst online: 21:20

Thijsmans

⭐⭐⭐⭐⭐ (5/5)

1. ERROR 425: Unable to connect with remote host.
2. Vast een simpele parse-error, oftewel ';' of '}' vergeten
3. /14
4.
code:
1
 blaat
maakt het wat duidelijker

:)

Privacy-adepten vinden op AVGtekst.nl de Nederlandse AVG-tekst voorzien van uitspraken en besluiten.


Verwijderd

JE doet wel meer fout: je opent het topic in het verkeerde subforum, je geeft niet aan wat je hebt geprobeerd, het ziet er niet echt uit alsof je goed hebt gedebugt, en je post een lap code zonder goede begeleidende tekst.

En nu verwacht je van ons dat we wel even uitzoeken wat die code moet doen, wat die code doet, en wat en waar er precies iets mis gaat?
Dream on, debuggen hoort er gewoon bij, besteed daar zelf eerst maar eens wat tijd aan. :)

Dit topic is gesloten.