Jump to content

Archived

This topic is now archived and is closed to further replies.

natalieG

include problem

Recommended Posts


we have the table below that is trying to include the file index.php from an immediate
subdirectory of public_html, where public_html is where this code is located. We hae tried
changing the code to './calendar/index.php' and also made it absolluter
/home/msdsimg/public_html/calendar/index.php and we get the error messages in the attached
image.

Thanks,

Jennifer




<table width="800" border="0" cellspacing="0" cellpadding="0">
<tr width="800">
<TD><A HREF="http://msdsimaging.com/newitems_main.php"><img src='newitems_small.gif'></TD>
<td align="center" width="800"><?php include 'Movie1.html' ?></td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr width="800">
<td width="150" valign="top"><?php include 'main_left.php' ?></td>
<td width="650" align="center"><?php include 'calendar/index.php' ?></td>
</tr>
</table>


[img src=\"http://msdsimaging.com/calendar.jpg\" border=\"0\" alt=\"IPB Image\" /]

Share this post


Link to post
Share on other sites
I'm not sure what you're trying to achieve.

As you can see, the error is in calendar/index.php

and you're trying to include calendar/index.php?

that would create an infinite loop?


I'd suggest 'require' and format it like <? require ("index.php"); ?>

If the file cannot be found, you could try complete URLs (<? require ("http://www.whatever.com/index.php"); though I have the feeling some servers may have this feature disabled. However, it should be on the same server, so it might be possible. It shouldn't give errors.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.