On January 27 2009 17:02 Abydos1 wrote:My knowledge of php is limited so may this be inaccurate. The . is the string concatenate operator in PHP so $page . ".php" is adding .php on to the end of the page variable which its getting from the post. So + Show Spoiler [code] + $file = "/pages/" . $page . ".php" should work for you. It's also checking the $allowed array to see if its a valid page so make sure all your included pages (just the page name, not folder & .php extension) are included in that array.
Thanks alot! That did the trick, though I had to first remove the first forward slash from "/pages/". -> "pages/". It seems I had confused the . when I was reading about include paths in php.ini
Thanks for your help!
Last edit: 2009-01-27 17:16:21 |