|
-
January 18th, 2003, 11:44 PM
#1
Senior Member
apache question
Hello,
I'm wondering if there's a way in apache to dynamically prepend a text or html file to a html file being served in a specific directory. In other words, in /stuff, all files requested would automatically have the file foo.htm prepended to that document. I hope I made that clear.
Is there a way to do that without editing each file? (like an apache config directive or such) and besides SSI...?
Either get busy living or get busy dying.
-The Sawshank Redemption
-
January 19th, 2003, 01:06 AM
#2
Id hope I understood it correctly, but there is some piece of javascript or maybe html even that let's you insert another pages code... I don't remember, but it was something with <insert or <include ... I have to look that up a bit.
-
January 19th, 2003, 01:03 PM
#3
I think neel is takling about the PHP include() function. That would work, but you have to edit all files in that directory to include this line:
PHP Code:
<?php include("foo.php") ?>
I wish to express my gratitude to the people of Italy. Thank you for inventing pizza.
-
January 19th, 2003, 08:51 PM
#4
Yeah php has that, but I thought he was talking about html... I thought there was something similar in javascript, I only don't remember because I don't use javascript anymore for the things that php can do for me.
-
January 20th, 2003, 05:36 AM
#5
For html solution, see some examples of dynamic html using javascript in http://www.dynamicdrive.com/dynamicindex17/index.html
to get some ideas. Specifically learn about the src property of an iframe.
But again, yes, this means editing each file to insert some codes. The original question was asking how to do it w/o editing each file by utilizing apache directive or such. Oh well, i'm not aware of any other way. Sorry. 
Peace always,
<jdenny>
Always listen to experts. They\'ll tell you what can\'t be done and why. Then go and do it. -- Robert Heinlein
I\'m basically a very lazy person who likes to get credit for things other people actually do. -- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|