Jump to content

include problem


natalieG

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\" /]
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.