hi everybody,
je débute en php. je viens de creer un script que j'ai uploadé sur mon serveur mais quand je tape l url rien ne s'affiche (page blanche)
voila mon code:
et l'url de mon fichier
si vous comprennez ce qui bug...
merci
je débute en php. je viens de creer un script que j'ai uploadé sur mon serveur mais quand je tape l url rien ne s'affiche (page blanche)
voila mon code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head>
<title>Menu déroulant horizontal à plusieurs niveaux en DHTML</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="fr" />
<meta name="Robots" content="follow" />
<meta name="MSSmartTagsPreventParsing" content="TRUE" />
<!-- script du menu -->
<script type="text/javascript" src="lemenu.js"></script>
<!-- détéction du navigateur -->
<script type="text/javascript" src="browserdetect.js"></script>
<style type="text/css">
@import "lemenuH.css";
</style>
</head>
<body>
<?php
// Sélecton de la table / Langue de la session
/*
if ($_SESSION['lang'] == 'fr') {
$lang_table = '';
} else {
$lang_table = '_'.$_SESSION['lang'];
}
*/
$root = $_SERVER['DOCUMENT_ROOT'];
$lang_table = '';
$dom = new DomDocument;
$dom->preserveWhiteSpace = false;
$dom->formatOutput = true;
if ($dom->load($root."/xml/nav".$lang_table.".xml")) {
$nav_root = $dom->documentElement;
$nav_nb = $nav_root->childNodes->length;
if ($nav_nb > 0) {
//Niveau 1
echo "<ul id=\"menu\">";
foreach($nav_root->childNodes as $nav_node) {
switch ($nav_node->getAttribute("type")) {
case "advanced":
if ($nav_node->getAttribute("clic") == "1") {
echo "<li><a href=\"index.php?id=".$nav_node->getAttribute("id")."\">".htmlentities($nav_node->getAttribute("text"), ENT_QUOTES, 'utf-8')."</a></li>";}
break;
case "template":
if ($nav_node->getAttribute("clic") == "1") {
echo "<li><a href=\"index.php?id=".$nav_node->getAttribute("id")."\">".htmlentities($nav_node->getAttribute("text"), ENT_QUOTES, 'utf-8')."</a></li>";}
break;
case "module":
echo "<li><a href=\"".$nav_node->getAttribute("mod_link")."\">".htmlentities($nav_node->getAttribute("text"), ENT_QUOTES, 'utf-8')."</a></li>";
break;
case "other":
if ($nav_node->getAttribute("clic") == "1") {
echo "<li><a href=\"index.php?id=".$nav_node->getAttribute("id")."\">".htmlentities($nav_node->getAttribute("text"), ENT_QUOTES, 'utf-8')."</a></li>";}
break;
case "link":
if ($nav_node->getAttribute("clic") == "1") {
echo "<li><a href=\"javascript:void();\" onclick=\"displayWindow('".$nav_node->getAttribute("url")."','Mailing Liste',".$nav_node->getAttribute("width").",".$nav_node->getAttribute("height").",'".$nav_node->getAttribute("features")."\">".htmlentities($nav_node->getAttribute("text"), ENT_QUOTES, 'utf-8')."</a></li>";}
break;
echo "</ul>";
}
}
//Niveau 2
foreach($nav_root->childNodes as $nav_node) {
if ($nav_node->hasChildNodes()) {
echo "<ul>";
foreach($nav_node->childNodes as $subnav_node) {
switch ($nav_node->getAttribute("type")) {
case "advanced":
if ($nav_node->getAttribute("clic") == "1") {
echo "<li><a href=\"index.php?id=".$nav_node->getAttribute("id")."\">".htmlentities($nav_node->getAttribute("text"), ENT_QUOTES, 'utf-8')."</a></li>";}
break;
case "template":
if ($nav_node->getAttribute("clic") == "1") {
echo "<li><a href=\"index.php?id=".$nav_node->getAttribute("id")."\">".htmlentities($nav_node->getAttribute("text"), ENT_QUOTES, 'utf-8')."</a></li>";}
break;
case "module":
echo "<li><a href=\"".$nav_node->getAttribute("mod_link")."\">".htmlentities($nav_node->getAttribute("text"), ENT_QUOTES, 'utf-8')."</a></li>";
break;
case "other":
if ($nav_node->getAttribute("clic") == "1") {
echo "<li><a href=\"index.php?id=".$nav_node->getAttribute("id")."\">".htmlentities($nav_node->getAttribute("text"), ENT_QUOTES, 'utf-8')."</a></li>";}
break;
case "link":
if ($nav_node->getAttribute("clic") == "1") {
echo "<li><a href=\"javascript:void();\" onclick=\"displayWindow('".$nav_node->getAttribute("url")."','Mailing Liste',".$nav_node->getAttribute("width").",".$nav_node->getAttribute("height").",'".$nav_node->getAttribute("features")."\">".htmlentities($nav_node->getAttribute("text"), ENT_QUOTES, 'utf-8')."</a></li>";}
break;
}
}
echo "</ul>";
}
}
echo "<script language=\"javascript\">initMenu();</script>";
?>
</body>
</html>
et l'url de mon fichier
si vous comprennez ce qui bug...

merci