[Système] erreur sur glob
bonjour à tous,
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
...
<a href="index.php?page=download">download</a>
...
<?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;
?> |
Citation:
Error: Warning: in_array() [function.in-array]: Wrong datatype for second argument in /mnt/141/sda/2/c/j.d.e/index.php on line 26
What's wrong??
Principe par pseudo frames, le rép 'includes' contient des fichiers en .inc.php.
Merci !