This is very strange. I can't seem to access the parent directory using a simple ../ in my include file:
[font=courier]
<?
if (! isset($state))
$state="vic";
if (! isset($page))
$page="latest";
$file="../" . $page . ".php?state=" . $state;
include($file);
?>
<a href="<? echo $file; ?>">This makes no sense</a>
[/font]
output is:
Warning: main(../latest.php?state=vic): failed to open stream: No such file or directory in /home/unique/public_html/inprogres_ s/vtc/vic/index.php on line 9
Warning: main(../latest.php?state=vic): failed to open stream: No such file or directory in /home/unique/public_html/inprogres_ s/vtc/vic/index.php on line 9
Warning: main(): Failed opening '../latest.php?state=vic' for inclusion (include_path='.:/usr/lib/php:/usr /local/lib/php') in /home/unique/public_html/inprogres s/vtc/vic/index.php on line 9
But the link underneath that uses the exact same string in a HTML <a href=""> works fine. Do i have to set the include_path variable, just to reference a file in the parent directory? What's the simplest way of including a file from the parent directory?