Pseudo Frame sur Free ne fonctionne pas
Bonjour enfin re bonjour,
Voila j'utilise ce system :
http://www.sutekidane.net/blog/pseud...-pratique.html
En local il marche a merveille, mais quand je l'upload sur free il me marque une erreur :
Citation:
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /mnt/102/sda/3/a/depann49/testtest/pseudos-frames/pseudos-frames/pseudos-frames.php on line 26
Le code de la ligne 26 !
Code:
if (isset($_GET["page"]) && in_array(PATH . $_GET["page"] . ".inc.php", $tableau)) {
Le code complet de pseudos-frames.php :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
<!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" lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?php echo (isset($_GET["page"])) ? "Page demandée : " . $_GET["page"] : "Pseudos Frames en pratique"; ?></title>
<style type="text/css">
@import "../common.css";
</style>
</head>
<body>
<div id="conteneur">
<div id="header">
<h1>Gestion des Pseudos Frames</h1>
<ul id="menu">
<li><a href="pseudos-frames.php?page=in_array">in_array</a></li>
<li><a href="pseudos-frames.php?page=glob">glob</a></li>
<li><a href="pseudos-frames.php?page=str_pad">str_pad</a></li>
<li><a href="pseudos-frames.php?page=toto">toto</a> (page inexistante)</li>
</ul>
</div>
<div id="page">
<?php
define("PATH", "./includes/");
// Tableau contenant les pages autorisées
$tableau = glob(PATH . "*.inc.php");
if (isset($_GET["page"]) && in_array(PATH . $_GET["page"] . ".inc.php", $tableau)) {
$pageInclude = PATH . $_GET["page"] . ".inc.php";
}
else {
$pageInclude = PATH . "default.inc.php";
}
include $pageInclude;
?>
</div>
<p id="footer">
<br />
<a href="/blog/19-pseudos-frames-en-pratique.html">Retour au billet</a>
|
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img src="/images/org/css2.gif" title="CSS" alt="CSS" /></a>
|
<a href="http://validator.w3.org/check?uri=referer"><img src="/images/org/xhtml1.0.gif" title="Valid XHTML 1.0!" alt="Valid XHTML 1.0!" /></a>
|
<a href="/blog/">Accueil</a>
</p>
</div>
</body>
</html> |
Ce sont les fichiers d'origines je n'ai fait aucunes modifications sur ceux la.
J'ai chercher partout sur le net et meme sur le site donné plus haut mais rien
Merci a vous :)