i am including "navigation.php" which has the common menu in all my views .
<div id="navigation">
<? include("navigation.php"); ?>
</div>
this code works in every other files but in one file it gives errors .
Severity: Warning
Message: include(navigation.php): failed to open stream: No such file or directory
Filename: views/readsinvo_index.php
Line Number: 2
Severity: Warning
Message: include(): Failed opening 'navigation.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php')
Filename: views/readsinvo_index.php
Line Number: 2
in "readsinvo_index.php" it is same as the other files
<div id="navigation">
<? include("navigation.php"); ?>
</div>
and both the files are inside "views" . both files have permission 777 .
But when i tried with
<? include(dirname(__FILE__)."/navigation.php"); ?>
It works perfectly , but in all other pages , it is working when used
<? include("navigation.php"); ?>
is there any possible reason that i cannot include the file normally only in this file . I am using codeigniter framework and CentOS .