Elliot,<br><br>Here is a better explanation of how I structure my code. In the eclipse project I wanted to set projectname as the root directory.<br><br>Now projectname/htdocs is the webroot. Every single file in htdocs includes a file called 
config.inc.php. The file includes this code:<br><br>if(preg_match(&quot;/WINDOWS/i&quot;, $_SERVER[&quot;SystemRoot&quot;]))<br>{<br>&nbsp;&nbsp;&nbsp; // THIS IS A WINDOWS MACHINE<br><br>&nbsp;&nbsp;&nbsp; ## Include paths<br>&nbsp;&nbsp;&nbsp; $_PATHS[&quot;base&quot;]&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; = dirname(dirname(__FILE__)) . &quot;\\&quot;;
<br>&nbsp;&nbsp;&nbsp; $_PATHS[&quot;includes&quot;]&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; = $_PATHS[&quot;base&quot;] . &quot;includes\\&quot;;<br>&nbsp;&nbsp;&nbsp; $_PATHS[&quot;templates&quot;]&nbsp;&nbsp;&nbsp; = $_PATHS[&quot;base&quot;] . &quot;templates\\&quot;;<br>&nbsp;&nbsp;&nbsp; $_PATHS[&quot;pear&quot;]&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; = $_PATHS[&quot;base&quot;] . &quot;pear\\&quot;;
<br>&nbsp;&nbsp;&nbsp; $_PATHS[&quot;logs&quot;]&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; = $_PATHS[&quot;base&quot;] . &quot;logs\\&quot;;<br>&nbsp;&nbsp;&nbsp; $_PATHS[&quot;sidebar&quot;]&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; = $_PATHS[&quot;base&quot;] . &quot;sidebar\\&quot;;<br><br>&nbsp;&nbsp;&nbsp; /**<br>&nbsp;&nbsp;&nbsp; * Set include path
<br>&nbsp;&nbsp;&nbsp; */<br>&nbsp;&nbsp;&nbsp; ini_set(&quot;include_path&quot;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;.;$_PATHS[includes];$_PATHS[templates];$_PATHS[pear];$_PATHS[sidebar]&quot;);<br><br>}else{<br>&nbsp;&nbsp;&nbsp; // NOT A WINDOWS MACHINE (Linux, Mac, FreeBSD)<br>
<br>&nbsp;&nbsp;&nbsp; ## Include paths<br>&nbsp;&nbsp;&nbsp; $_PATHS[&quot;base&quot;]&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; = dirname(dirname(__FILE__)) . &quot;/&quot;;<br>&nbsp;&nbsp;&nbsp; $_PATHS[&quot;includes&quot;]&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; = $_PATHS[&quot;base&quot;] . &quot;includes/&quot;;<br>&nbsp;&nbsp;&nbsp; $_PATHS[&quot;templates&quot;]&nbsp;&nbsp;&nbsp; = $_PATHS[&quot;base&quot;] . &quot;templates/&quot;;
<br>&nbsp;&nbsp;&nbsp; $_PATHS[&quot;pear&quot;]&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; = $_PATHS[&quot;base&quot;] . &quot;pear/&quot;;<br>&nbsp;&nbsp;&nbsp; $_PATHS[&quot;logs&quot;]&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; = $_PATHS[&quot;base&quot;] . &quot;logs/&quot;;<br>&nbsp;&nbsp;&nbsp; $_PATHS[&quot;sidebar&quot;]&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; = $_PATHS[&quot;base&quot;] . &quot;sidebar/&quot;;
<br><br>&nbsp;&nbsp;&nbsp; /**<br>&nbsp;&nbsp;&nbsp; * Set include path<br>&nbsp;&nbsp;&nbsp; */<br>&nbsp;&nbsp;&nbsp; ini_set(&quot;include_path&quot;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;.:$_PATHS[includes]:$_PATHS[templates]:$_PATHS[pear]:$_PATHS[logs]:$_PATHS[sidebar]&quot;);<br>}<br><br>this lovely bit of code means that I don't have to type:
<br><br>include_once(&quot;../includes/functions.php&quot;);<br><br>I can just do this instead:<br><br>include_once(&quot;functions.php&quot;);<br><br>Unfortunately eclipse does not seem to enjoy this style of structuring which is a shame because I find it highly effective.
<br><br>I shall have to look into your suggestion of using a problems filter, that sounds promising.<br><br>Pete<br><br><br><br><div><span class="gmail_quote">On 4/26/06, <b class="gmail_sendername">Elliot Smith</b> &lt;<a href="mailto:elliot@townx.org">
elliot@townx.org</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Dear Pete,<br><br>Although I don't organise my code like this, from what I know of
<br>PHPEclipse, it should resolve paths correctly if you did your includes<br>something like this (presuming you set projectname as the root directory<br>when creating your Eclipse project):<br><br>require_once('../includes/file.php');
<br><br>I assume you're doing something like this, rather than using absolute<br>paths? Another approach may be to just exclude those messages from the<br>problems list using a filter.<br><br>Elliot<br><br><br>pete graham wrote:
<br><br>&gt; I have been experimenting with PHPeclipse yesterday and today. Here is<br>&gt; a fairly big problem that I have run into that has stopped me from<br>&gt; using it.<br>&gt;<br>&gt; Eclipse generates a lot of warnings of type: &quot;Include filename
<br>&gt; 'blah.php' doesn't exist in project.&quot;<br>&gt;<br>&gt; I tried to explicitly set the &quot;Include Path&quot; for the project in<br>&gt; &quot;Project-&gt;Properties-&gt;PHP Project Settings-&gt;Include Paths&quot; (although
<br>&gt; this shouldn't be necessary because these paths are dynamically set by<br>&gt; a set_include_path() call in the script). This hasn't solved the problem.<br>&gt;<br>&gt; All my projects have this structure<br>&gt;
<br>&gt; projectname/htdocs/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# actual website root<br>&gt; projectname/includes/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# mostly php classes and files<br>&gt; with programming logic<br>&gt; projectname/templates/&nbsp;&nbsp; # html files, headers footers, etc
<br>&gt;<br>&gt; I find this an effective way of organising the files. It seems the<br>&gt; only way to get PHPeclipse to not generate the errors is to place all<br>&gt; code in the website root which I really don't want to do. Can anyone
<br>&gt; help me on this problem?<br>&gt;<br>&gt; I saw on a forum post that &quot;working sets&quot; may be able to solve my<br>&gt; problem, but I'm quite unclear on what these are.<br>&gt;<br>&gt; Pete<br>&gt;<br>&gt;------------------------------------------------------------------------
<br>&gt;<br>&gt;_______________________________________________<br>&gt;Phpwm mailing list<br>&gt;<a href="mailto:Phpwm@mailman.lug.org.uk">Phpwm@mailman.lug.org.uk</a><br>&gt;<a href="https://mailman.lug.org.uk/mailman/listinfo/phpwm">
https://mailman.lug.org.uk/mailman/listinfo/phpwm</a><br>&gt;<br>&gt;<br><br><br>_______________________________________________<br>Phpwm mailing list<br><a href="mailto:Phpwm@mailman.lug.org.uk">Phpwm@mailman.lug.org.uk</a>
<br><a href="https://mailman.lug.org.uk/mailman/listinfo/phpwm">https://mailman.lug.org.uk/mailman/listinfo/phpwm</a><br></blockquote></div><br>