Including file

  • inewview
  • Born
  • Born
  • No Avatar
  • Joined: Mar 20, 2004
  • Posts: 3
  • Loc: Toronto
  • Status: Offline

Post March 20th, 2004, 11:44 pm

Whats the easist way of including a remote html file in a window? I used Iframes, but they suck. Any php way of doing it? Anyone have a snippet?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 20th, 2004, 11:44 pm

  • Johan007
  • Guru
  • Guru
  • User avatar
  • Joined: Sep 17, 2003
  • Posts: 1080
  • Loc: Aldershot, UK
  • Status: Offline

Post March 21st, 2004, 4:34 am

Make a page then re-name it to .php file then place this where you want the new code (maybe nested inside one of your table) this is VERY much more simple than frames:

Code: [ Select ]
<?php include("menu.htm") ?>


Or in ASP its maybe a little tricky at first so best look it up on the web but its something like this:

Code: [ Select ]
<!-- #Include virtual="/page.asp" -->
Read my Movie Reviews punk!
  • inewview
  • Born
  • Born
  • No Avatar
  • Joined: Mar 20, 2004
  • Posts: 3
  • Loc: Toronto
  • Status: Offline

Post March 21st, 2004, 6:46 am

This is the site I am working on, http://www.inewview.com/clients/mls/new.shtml copied onto my local server and put in using iframes. The issue with this site is that the search box on the right is being hosted on a third server, and needs to have some way of being included even though it is on a remote server. I think it dosent look so great now, and every link opens in the same field, which is not what I am looking for at all. Is it possible that a click in that box would open in a new field? (I dont have access to the code on that page)
  • Johan007
  • Guru
  • Guru
  • User avatar
  • Joined: Sep 17, 2003
  • Posts: 1080
  • Loc: Aldershot, UK
  • Status: Offline

Post March 21st, 2004, 2:29 pm

erm what is shtml?
Read my Movie Reviews punk!
  • inewview
  • Born
  • Born
  • No Avatar
  • Joined: Mar 20, 2004
  • Posts: 3
  • Loc: Toronto
  • Status: Offline

Post March 21st, 2004, 5:15 pm

Web pages that contain SSIs (server side include) often end with an shtml extension, though this is not a requirement. The filename extension enables the Web server to differentiate those pages that need to be processed before they are sent to the browser.
  • _Leo_
  • Proficient
  • Proficient
  • User avatar
  • Joined: Feb 17, 2004
  • Posts: 279
  • Loc: Buenos Aires, Argentina
  • Status: Offline

Post March 21st, 2004, 7:57 pm

Well, you will need server side scripting for this.

In PHP:

Code: [ Select ]
include('http://www.foreing.com/file_to_include.html');
  • Johan007
  • Guru
  • Guru
  • User avatar
  • Joined: Sep 17, 2003
  • Posts: 1080
  • Loc: Aldershot, UK
  • Status: Offline

Post March 22nd, 2004, 2:24 am

inewview wrote:
Web pages that contain SSIs (server side include) often end with an shtml extension, though this is not a requirement. The filename extension enables the Web server to differentiate those pages that need to be processed before they are sent to the browser.

Is that using PHP or any server side thats installed on the server? I always end mine in PHP or ASP!
Read my Movie Reviews punk!
  • rjstephens
  • Professor
  • Professor
  • User avatar
  • Joined: Jul 28, 2003
  • Posts: 774
  • Loc: Brisbane, Australia
  • Status: Offline

Post March 22nd, 2004, 2:48 am

NO, that's talking about something completely different. End php with .php, and asp with .asp. SSI (server side include) is a different language entirely.

http://www.w3.org/Jigsaw/Doc/User/SSI.html
  • _Leo_
  • Proficient
  • Proficient
  • User avatar
  • Joined: Feb 17, 2004
  • Posts: 279
  • Loc: Buenos Aires, Argentina
  • Status: Offline

Post March 22nd, 2004, 6:24 am

That's right, you need PHP support, and name your file .php

If you don't have any idea of PHP, start by reading something about it. http://www.php.net
It's a little more complex than SSI but a lot more powerful.

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 252 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.