Jump to content

Recommended Posts

Hello experts,

 

Please bear with me for a somewhat silly question.

 

This code below works fine when placed on a php server.

 

	echo "<table border=1 align=center width=300><tr><td>";
      include ("smallcal.php");
echo "</td></tr></table>";

 

It allows us to place a mini calendar on the home page of our website.

 

However, we would like place this mini calendar on another server that is not a php server.

 

Is there any way place this calendar on another page on another server?

 

In other words, instead of include("smallcal.php"), can this snip be written to something like <a href="http://servername/calendar/smallcal.php"???

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/207678-calling-php-from-non-php-page/
Share on other sites

Thanks Thorpe for your prompt response.

 

I suppose I didn't explain it well.

 

That, I think, may explain why you moved it to html page.

 

Is there another way to write include("smallcal.php")

 

For instance, if I put it in an iframe like you suggested like this:

 

      <table>
          <tr>
      <td align="center"><br>
		<IFRAME SRC="smallcal.php" NAME="Mini Calendar" FRAMEBORDER=0 SCROLLING=auto WIDTH="250" HEIGHT="210" MARGINHEIGHT=0 MARGINWIDTH=10 ALIGN=TOP>
		</IFRAME>
	       </td>
		<td align="justified" valign="middle"><br>
	   </td>
	 </tr>
	</table>

 

As you can see, I can't save this file as smallcal.php because the page I want to display it on is not a php server.

 

If I save it as smallcal.htm, I get the php text, not the calendar.

 

Hope my explanation is clearer.

 

Again, thanks,

The html document containing the iframe code goes on the server without php. You then use....

 

<iframe src="http://phpenabledserver.com/smallcal.php"></iframe>

 

To include the php script into that page. Like I said however, there is no guarantee it will work as expected because the php will be parsed on the remote (php enabled) server then it will serv the html to the frame.

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.