Forum Moderators: coopster
index.php?pageinclude=pages/about.php?id=5
so i am trying to include a page on my index.php. When i try this i always get my error 'page cannot be found'. I have also tried ?pageinclude=pages/about.php w/o the $_GET var and i got this error:
SecureSSI: The Script (/usr/export/www/hosting/dkicks/index.php) has tried outside from their user-draw-eats the file../mysql_connect.php to access.
This is not permitted!
what does this mean?
I really need help on this.
thanks,
electricocean
include($_GET['pageinclude']); //?
I would change the? and = to some string, eg.
<?php
$from = array("?", "=", "/", "\\");
$to = array("%1", "%2", "%3", "%4"); // just special characters$link = "pages/about.php?id=5";
$a = str_replace($from, $to, $link);
?>
<a href="index.php?pageinclude=<? echo $a;?>">Click</a>
And in the receive file:
<?php
$to = array("?", "=", "/", "\\");
$from = array("%1", "%2", "%3", "%4"); // just special characters$link = str_replace($from, $to, $_GET['pageinclude']);
if(check_if_url_inside_domain_and_correct($link))
{
include($link);
}
Hope this helps!
Michal Cibor