Forum Moderators: coopster
Here is what is happening. All the files in the $allfiles array below are appearing but one. The html page called test.html is not appearing or is any other page I put in that has an html extension. I can't figure out why. In the "if" values below if I switch html with another position, the same problem occurs. The html pages are not being pulled when all the others are. Due to the nature of our pages, I need to call the pages a similar way specifying which ones I need pulled. Can anyone spot why this would be happening? Please let me know, thank you very much. [1][edited by: Simone100 at 9:11 pm (utc) on Aug. 30, 2007]<?php
ini_set('error_reporting', 8191);
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
$maximum = 3;
$a = (isset($_COOKIE['e']) && intval($_COOKIE['e']) < $maximum)? intval($_COOKIE['e'])+1 : 1;
setcookie("e", $a, time()+60*60*24*180);
$currentfile = $a;
$allfiles = Array();
$allfiles[1] = "test.php";
$allfiles[2] = "test.txt";
$allfiles[3] = "test.html";
if (in_array(substr($allfiles[$currentfile], -3), array('html','txt','php')))
{$get_content = file_get_contents($allfiles[$currentfile]);
echo $get_content;}
?>