 |
 |
Including external .html files
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2003
Location: Virginia
Status:
Offline
|
|
Hi. I have created an Automator workflow that downloads some statistics from another website to my computer, converts it to proper text encoding, then opens a RealBasic parser I wrote that scans the file looking for specific items. The parser's output is an .html table that gets passed back to the Automator workflow and it uploaded to my web site.
My problem is I don't know how to include that newly generated .html file into my existing document (show it inline with the rest).
Is there a way to include the external .html file in my existing index.html? I thought I was done...hehehe. Thanks.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2001
Location: CO
Status:
Offline
|
|
Well, to those of us spoiled by PHP (and therefore using .php extensions instead of .html), It's just a matter of
<?php
include "../parseroutputfile.txt";
include "http://www.otherwebsite.com/parseroutputfile.php";
include "http://www.stillanotherbunchofhtml.com/parsersoutputfile.htm";
?>
Then the RealBasic parser-created file should not actually have HTML headers,etc... just the actual html code. Its HTML will appear in your existing document just as if you hand-coded it where the bracketed PHP code appears.
I have not had to learn alternatives, given PHP.
You DO need to have existing file end in .php (or something else that your server is set to parse through its PHP routines).
PHP: Don't code HOME without it.
|
|
TOMBSTONE: "He's trashed his last preferences"
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status:
Offline
|
|
Or you could use an iframe.
|
|
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jan 2001
Location: Salt Lake City, UT USA
Status:
Offline
|
|
php is a great solutions. you can also use apache includes if you wanted.
<!-- #include file="filename.html" -->
(Though I recommend PHP over it.)
|
|
2008 iMac 3.06 Ghz, 2GB Memory, GeForce 8800, 500GB HD, SuperDrive
8gb iPhone on Tmobile
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jan 2002
Location: Live at the BBQ
Status:
Offline
|
|
you could also try SSI (server side include), which means you could save your RealBasic output to a plain txt file (or html, if you prefer). So your main file would be named index.shtml, and at the proper location where you want to insert the new file, you would add
Code:
<!--#include file="newfile.txt"-->
|
|
"Bill Gates can't guarantee Windows... how can you guarantee my safety?"
-John Crichton
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |