Include(e) [function.include] error

İndex.php

include(“sayfa.php”);
$sayfalar = @$_GET[“sayfa”];

if(!$sayfalar){
include($sayfa[1]);
}else{
include($sayfa[$sayfalar]);
}

Sayfa.php

<?php $sayfa[1] = "ss.php"; $sayfa[2] = "vh.php"; $sayfa[3] = "typhp"; $sayfa[4] = "ky.php"; $sayfa[5] = "bn.php"; $sayfa[6] = "lk.php"; $sayfa[7] = "help.php"; $sayfa[8] = "hk.php"; $sayfa[9] = "ek.php"; ?>

Warning: include() [function.include]: Unable to access e in /home/deneme/public_html/index.php on line 59

Warning: include(e) [function.include]: failed to open stream: No such file or directory in /home/deneme/public_html/index.php on line 59

Warning: include() [function.include]: Unable to access e in /home/deneme/public_html/index.php on line 59

Warning: include(e) [function.include]: failed to open stream: No such file or directory in /home/deneme/public_html/index.php on line 59

Warning: include() [function.include]: Failed opening ‘e’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/deneme/public_html/index.php on line 59

First, please place code inside the PHP tags so it is easier for us to copy it for testing.

Next, you are SUPPRESSING errors using the @$_GET[] variable. Remove the @ in case the real error
is being hidden.

Lastly, to DEBUG this code, add a line just after $sayfalar = line, and place this in it:
[php]die($sayfalar);[/php]
What this will do is stop the code and display the value of the variable $sayfalar…
My guess is that it is not pointing to the correct filename. Also, you have a typo for the entry for file
number 3, $sayfa[3] = “typhp” … I think you want it to be ty.php???

Since you did not ask us a question, I hope that I guessed what you wanted help with…

Sponsor our Newsletter | Privacy Policy | Terms of Service