Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2005-03-15, 05:49 PM   #1
JanTM
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
JanTM's Avatar
 
Join Date: Apr 2003
Location: Denmark
Posts: 446
Send a message via ICQ to JanTM
Unhappy SSI problem

Fiddling around with SSI I can't quite get it to work the way I want to.

Including files using

include virtual="file.html" or include virtual="/subdir/file.html" works just fine.
That is I can include files in the same directory or any subdirectory.

However... what I am trying to do is
include virtual="/../../anotherdomain.com/html/file.html"
And that doesn't work at all. In fact I can't seem to include any file in which the path to it involves going UP the directory strukture.

I have even tried a direct path like this
include virtual="/home/username/domain.com/html/file.html" - which doesn't work either. Anybody have any ideas... because the manuals I find online says it "should" be working |cry|
__________________
Tittius Maximus - Retired
JanTM is offline   Reply With Quote
Old 2005-03-15, 06:07 PM   #2
swedguy
Vagabond
 
swedguy's Avatar
 
Join Date: Aug 2003
Posts: 2,374
Send a message via ICQ to swedguy
"include virtual" goes from the root of the domain, for example:

http://domain.com/path1/something = virtual="/path1/something"

"include file" goes from current working directory

There's no way to include from outside the current domain, like /home/someotherdomain.com/....
swedguy is offline   Reply With Quote
Old 2005-03-15, 06:12 PM   #3
JanTM
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
JanTM's Avatar
 
Join Date: Apr 2003
Location: Denmark
Posts: 446
Send a message via ICQ to JanTM
Ach... not the answer I was hoping for. But thanks for clearing that up anyways. Another approach in then needed.
__________________
Tittius Maximus - Retired
JanTM is offline   Reply With Quote
Old 2005-03-15, 06:16 PM   #4
swedguy
Vagabond
 
swedguy's Avatar
 
Join Date: Aug 2003
Posts: 2,374
Send a message via ICQ to swedguy
Hmmm, I just thought of couple of workarounds. You could try to include a PHP file that has this in it...

<?include("/home/user/anotherdomain.com/html/file.html")?>

Then include it with <!--#include file="file.php" -->


Or do it more versatile

In your html page:
<!--#set var="filetoinclude" value="/home/user/anotherdomain.com/html/file.html" -->
<!--#include file="file.php" -->

in file.php:
<?include($filetoinclude)?>

In file.php you have to have some security measures so evil people can't include any kind of file on your server. I just made it simple, just so you get an idea how you can do it
swedguy is offline   Reply With Quote
Old 2005-03-15, 06:31 PM   #5
JanTM
Hello, is this President Clinton? Good! I figured if anyone knew where to get some tang it would be you
 
JanTM's Avatar
 
Join Date: Apr 2003
Location: Denmark
Posts: 446
Send a message via ICQ to JanTM
oh yes
That works like a charm. Thanks man
__________________
Tittius Maximus - Retired
JanTM is offline   Reply With Quote
Old 2005-03-15, 06:32 PM   #6
swedguy
Vagabond
 
swedguy's Avatar
 
Join Date: Aug 2003
Posts: 2,374
Send a message via ICQ to swedguy
np
swedguy is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:14 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc