The link http://grass.itc.it/grass60/screenshots/index.php
...produces...
Warning: Failed opening '../menu_top.inc' for inclusion (include_path='.:/usr/share/pear') in /hardmnt/grass1/html/grass60/screenshots/index.php on line 60
...(at least for me).
Jack Varga
Boulder, CO
On Thursday 10 March 2005 13:51, Jack Varga wrote:
The link http://grass.itc.it/grass60/screenshots/index.php
...produces...
Warning: Failed opening '../menu_top.inc' for inclusion
(include_path='.:/usr/share/pear') in
/hardmnt/grass1/html/grass60/screenshots/index.php on line 60
sorry, that was my fault.
I tried to fix the broken links in the top menu
in .../grass/60/screenshots/index.php by setting the ../../menu_top.inc
to ../menu_top.inc but this probably caused the problem you just reported.
I fixed it in cvs and reset the line 60 of index.php in ..grass60/screenshots
to the previous settings, hence broken links in top menu will be present
again but better than this error message.
Martin
Jack Varga
Boulder, CO
_______________________________________________
grass5 mailing list
grass5@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass5
--
Martin Wegmann
DLR - German Aerospace Center
German Remote Sensing Data Center
@
Dept.of Geography
Remote Sensing and Biodiversity Unit
University of Wuerzburg
Am Hubland
97074 Würzburg
phone: +49-(0)931 - 888 4797
fax: +49-(0)931 - 888 4961
http://www.biota-africa.org
http://www.biogis.de
On Fri, Mar 11, 2005 at 10:02:37AM -0500, Martin Wegmann wrote:
On Thursday 10 March 2005 13:51, Jack Varga wrote:
> The link http://grass.itc.it/grass60/screenshots/index.php
>
> ...produces...
>
> Warning: Failed opening '../menu_top.inc' for inclusion
> (include_path='.:/usr/share/pear') in
> /hardmnt/grass1/html/grass60/screenshots/index.php on line 60
sorry, that was my fault.
I tried to fix the broken links in the top menu
in .../grass/60/screenshots/index.php by setting the ../../menu_top.inc
to ../menu_top.inc but this probably caused the problem you just reported.
This doesn't work. Relative links are only implemented for
the first subdirectory level. Since grass60/screenshots/* live
in at subsubdirectory level, it crashes. Currentl, instead of
using the include() function, stuff must be hardcoded in the
file.
As I don't know much about PHP, is there a way to fix this
with a PHP function? A sort of on-the-fly update for PHP files
at subsubdirectory level?
I fixed it in cvs and reset the line 60 of index.php in ..grass60/screenshots
to the previous settings, hence broken links in top menu will be present
again but better than this error message.
Have a look at
http://grass.itc.it/grass60/screenshots/gui.php
which is correct. From this you can derive the fixes for the
other php pages in that directory.
Markus
On Friday 11 March 2005 08:05, Markus Neteler wrote:
[....]
Have a look at
http://grass.itc.it/grass60/screenshots/gui.php
which is correct. From this you can derive the fixes for the
other php pages in that directory.
hmm, the structure looks totally different to me index.php does have this
entry for the top menu
include("../../menu_search.inc");
?>
</td>
<td valign="top">
<?php
include("../../menu_top.inc");
?>
where gui.php does has a entry for each link:
<!-- TOP MENU INCLUDE FOR SUBDIRECTORIES -->
<table class="topmenu" bgcolor="#008000" cellspacing="0" cellpadding="0"
border="0" width="100%">
<tbody>
<tr>
<td><!-- TOP MENU -->
<table cellspacing="1" cellpadding="3" border="0" width="100%">
<tbody>
<tr bgcolor="#c5e2ca">
<td nowrap="nowrap" align="center">
<font size="-1"><a href="../../index.php">Home</a></font>
</td>
<td nowrap="nowrap" align="center">
<font size="-1"><a href="../../intro/index.php">Introduction</a></font>
</td>
I have no clue how to change it (where to insert the gui.php subdirectory
part) and try&error approaches wouldn't be the best because I cannot look at
the result unless I upload it to cvs and wait a couple of hours (is there a
way to see the final result on my computer like on the web?)
Martin
On Fri, Mar 11, 2005 at 02:21:22PM -0500, Martin Wegmann wrote:
On Friday 11 March 2005 08:05, Markus Neteler wrote:
[....]
> Have a look at
> http://grass.itc.it/grass60/screenshots/gui.php
> which is correct. From this you can derive the fixes for the
> other php pages in that directory.
hmm, the structure looks totally different to me index.php does have this
entry for the top menu
include("../../menu_search.inc");
?>
</td>
<td valign="top">
<?php
include("../../menu_top.inc");
?>
where gui.php does has a entry for each link:
You got it! The structure is different (as I tried to explain).
The include() stuff only works in subdirectories, but not yet in
subsubdirectories as grass60/screenshots/* is.
<!-- TOP MENU INCLUDE FOR SUBDIRECTORIES -->
<table class="topmenu" bgcolor="#008000" cellspacing="0" cellpadding="0"
border="0" width="100%">
...
I have no clue how to change it (where to insert the gui.php subdirectory
part) and try&error approaches wouldn't be the best because I cannot look at
the result
the trick is for the screenshot stuff:
- instead of using the include function actually *include* the code pieces
and fix the links
- or write a nifty PHP function to automatically fix ../ to ../../ (or vice verse,
can't remember)
unless I upload it to cvs and wait a couple of hours (is there a
way to see the final result on my computer like on the web?)
Sure: launch a web server on your local machine and copy the
stuff into the local web space. Then run from
http://localhost/index.php
Thanks
Markus