Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Error when using #include on webpage...

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Next:  Anyone used the program "Ghost Shop"?  
Author Message
user399

External


Since: Feb 22, 2004
Posts: 3



(Msg. 1) Posted: Sun Apr 18, 2004 8:02 pm
Post subject: Error when using #include on webpage...
Archived from groups: alt>www>webmaster (more info?)

I use #include in many webpages and it works just fine except in these
cases below. Can enyone say why:

Folder system:
www
|-files
|- content.txt
|-subfolder
|- webpage.shtml

I have a #include here that lokks like this:
<!--#include file="../content.txt" -->

When I access the page there is an Apache error (unable to perform
action or similar).
But if I change the directive like this:
<!--#include file="content.txt" -->
and move the file content.txt into the subfolder, then it works OK!

But I have many subfolders and I want to use one and the same file to
hold the contents data in order to ease maintenance so I don't want to
put a copy of the file in every subfolder.
Can someone advice what to do?
(Apache 2.0.48 on a Windows XP PC, but also the live website on a
Linux machine.)

/Bo


Bo Berglund
bo.berglund DeleteThis @telia.com

 >> Stay informed about: Error when using #include on webpage... 
Back to top
Login to vote
user398

External


Since: Feb 22, 2004
Posts: 97



(Msg. 2) Posted: Sun Apr 18, 2004 8:38 pm
Post subject: Re: Error when using #include on webpage... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Bo Berglund wrote:

 > I use #include in many webpages and it works just fine except in these
 > cases below. Can enyone say why:
 >
 > Folder system:
 > www
 > |-files
 > |- content.txt
 > |-subfolder
 > |- webpage.shtml
 >
 > I have a #include here that lokks like this:
 > <!--#include file="../content.txt" -->
 >
 > When I access the page there is an Apache error (unable to perform
 > action or similar).
 > But if I change the directive like this:
 > <!--#include file="content.txt" -->
 > and move the file content.txt into the subfolder, then it works OK!
 >
 > But I have many subfolders and I want to use one and the same file to
 > hold the contents data in order to ease maintenance so I don't want to
 > put a copy of the file in every subfolder.
 > Can someone advice what to do?
 > (Apache 2.0.48 on a Windows XP PC, but also the live website on a
 > Linux machine.)

Bo, since you are from Sweden, I take it in Swedish Smile

Eftersom du verkar vilja använda SSI (server side include) ska alla
filer som ska "infogas" i *.shtml filer via #include skrivas med
angivande av plats sett från från roten:

<!--#include virtual="/folder/file.txt"--> om filen ligger i en
subfolder, eller <!--#include virtual="/file.htm"--> om filen ligger i
roten. (OBS! Utan ".." före slash!)

<!-- #include file="content.txt" --> fungerar *bara* om filen
content.txt ligger i samma folder som *shtml filen. Det kan man
använda som tilläggsinfogning om content.txt bara ska användas för de
sidor som ligger i samma folder.

--
/Arne

--------------------------------------
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
--------------------------------------<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Error when using #include on webpage... 
Back to top
Login to vote
user399

External


Since: Feb 22, 2004
Posts: 3



(Msg. 3) Posted: Sun Apr 18, 2004 9:41 pm
Post subject: Re: Error when using #include on webpage... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sun, 18 Apr 2004 17:38:27 GMT, Arne <arne.luras.TakeThisOut@telia.com> wrote:

 >

 >Bo, since you are from Sweden, I take it in Swedish Smile
 >
 >Eftersom du verkar vilja använda SSI (server side include) ska alla
 >filer som ska "infogas" i *.shtml filer via #include skrivas med
 >angivande av plats sett från från roten:
 >
 ><!--#include virtual="/folder/file.txt"--> om filen ligger i en
 >subfolder, eller <!--#include virtual="/file.htm"--> om filen ligger i
 >roten. (OBS! Utan ".." före slash!)
 >
 ><!-- #include file="content.txt" --> fungerar *bara* om filen
 >content.txt ligger i samma folder som *shtml filen. Det kan man
 >använda som tilläggsinfogning om content.txt bara ska användas för de
 >sidor som ligger i samma folder.

Hmm,
jag provade att stoppa in dessa värden i filen i stället:
<!-- #include file="/www/files/content.txt" -->
och
<!-- #include file="/files/content.txt" -->
med båda gav samma resultat.

Vad menas med "virtual" i detta sammanhang? Skall det inte vara
"file"? Jag provade med detta i min IIS5 och det blev error 404 då..
Funkar det kanske *bara* med Apache?

/Bosse

Bo Berglund
bo.berglund.TakeThisOut@telia.com<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Error when using #include on webpage... 
Back to top
Login to vote
user398

External


Since: Feb 22, 2004
Posts: 97



(Msg. 4) Posted: Sun Apr 18, 2004 11:02 pm
Post subject: Re: Error when using #include on webpage... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Bo Berglund wrote:


 > On Sun, 18 Apr 2004 17:38:27 GMT, Arne <arne.luras.DeleteThis@telia.com> wrote:
 >
 >
 >
  >>Bo, since you are from Sweden, I take it in Swedish Smile
  >>
  >>Eftersom du verkar vilja använda SSI (server side include) ska alla
  >>filer som ska "infogas" i *.shtml filer via #include skrivas med
  >>angivande av plats sett från från roten:
  >>
  >><!--#include virtual="/folder/file.txt"--> om filen ligger i en
  >>subfolder, eller <!--#include virtual="/file.htm"--> om filen ligger i
  >>roten. (OBS! Utan ".." före slash!)
  >>
  >><!-- #include file="content.txt" --> fungerar *bara* om filen
  >>content.txt ligger i samma folder som *shtml filen. Det kan man
  >>använda som tilläggsinfogning om content.txt bara ska användas för de
  >>sidor som ligger i samma folder.
 >
 >
 > Hmm,
 > jag provade att stoppa in dessa värden i filen i stället:
 > <!-- #include file="/www/files/content.txt" -->
 > och
 > <!-- #include file="/files/content.txt" -->
 > med båda gav samma resultat.
 >
 > Vad menas med "virtual" i detta sammanhang? Skall det inte vara
 > "file"? Jag provade med detta i min IIS5 och det blev error 404 då..
 > Funkar det kanske *bara* med Apache?

Jag är nog inte så bra på att förklara, är jag rädd, men "virtual"
används när filen *inte* ligger i samma mapp som den webbsida
jag infogar till. Det har antagligen att göra med servern när den är
konfigurerad för SSI.

Därför används "virtual" för alla filer som ska infogas på många
webbsidor, för att det då inte spelar någon roll var webbsidan ligger
i förhållande till den fil som ska infogas.
"File" används bara om filen ligger i samma mapp som webbsidan, men
för enkelhetens skull har jag nästan alltid använt "virtuell", även om
det ibland skulle ha räckt med "file".

Jag utgår ifrån att du har en egen domän? För "vanliga"
webbsidesplatser hos en ISP brukar sällan ha stöd för SSI. Men även
ett domänhotell måste konfigurera servern så att den får stöd för SSI,
annars fungerar det inte. Om du inte har en server på din egen PC
(konfigurerad med stöd för SSI) fungerar det inte på PCn heller, bara
online efter uppladdning av filerna till servern/webbhotellet.

Jag kan tyvärr ingenting om Windows servrar, men rimligtvis borde det
ju fungera även i dem. Det fungerar i alla fall även i andra icke
Windows servrar och alltså inte bara i Apache.

--
/Arne<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Error when using #include on webpage... 
Back to top
Login to vote
xxxspam1

External


Since: Mar 12, 2004
Posts: 123



(Msg. 5) Posted: Mon Apr 19, 2004 1:11 am
Post subject: Re: Error when using #include on webpage... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

While sitting in a puddle Arne scribbled in the mud:

 > Jag „r nog inte s† bra p† att f”rklara, „r jag r„dd, men "virtual"
 > anv„nds n„r filen *inte* ligger i samma mapp som den webbsida
 > jag infogar till. Det har antagligen att g”ra med servern n„r den „r
 > konfigurerad f”r SSI.
 >
 > D„rf”r anv„nds "virtual" f”r alla filer som ska infogas p† m†nga
 > webbsidor, f”r att det d† inte spelar n†gon roll var webbsidan ligger
 > i f”rh†llande till den fil som ska infogas.
 > "File" anv„nds bara om filen ligger i samma mapp som webbsidan, men
 > f”r enkelhetens skull har jag n„stan alltid anv„nt "virtuell", „ven om
 > det ibland skulle ha r„ckt med "file".
 >
 > Jag utg†r ifr†n att du har en egen dom„n? F”r "vanliga"
 > webbsidesplatser hos en ISP brukar s„llan ha st”d f”r SSI. Men „ven
 > ett dom„nhotell m†ste konfigurera servern s† att den f†r st”d f”r SSI,
 > annars fungerar det inte. Om du inte har en server p† din egen PC
 > (konfigurerad med st”d f”r SSI) fungerar det inte p† PCn heller, bara
 > online efter uppladdning av filerna till servern/webbhotellet.
 >
 > Jag kan tyv„rr ingenting om Windows servrar, men rimligtvis borde det
 > ju fungera „ven i dem. Det fungerar i alla fall „ven i andra icke
 > Windows servrar och allts† inte bara i Apache.

Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse
molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero
eros et accumsan et iusto odio dignissim qui blandit praesent luptatum
zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum
dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh
euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper
suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel
eum iriure dolor in hendrerit in vulputate velit esse molestie consequat,
vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et
iusto odio dignissim qui blandit praesent luptatum zzril delenit augue
duis dolore te feugait nulla facilisi.

Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet
doming id quod mazim placerat facer possim assum. Lorem ipsum dolor sit
amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod
tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad
minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis
nisl ut aliquip ex ea commodo consequat.

Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse
molestie consequat, vel illum dolore eu feugiat nulla facilisis.

--
Duende<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Error when using #include on webpage... 
Back to top
Login to vote
user58

External


Since: Apr 27, 2004
Posts: 204



(Msg. 6) Posted: Mon Apr 19, 2004 1:11 am
Post subject: Re: Error when using #include on webpage... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

: While sitting in a puddle Arne scribbled in the mud:
: > Jag „r nog inte s† bra p† att f”rklara, „r jag r„dd, men "virtual"
: > anv„nds n„r filen *inte* ligger i samma mapp som den webbsida
: > jag infogar till. Det har antagligen att g”ra med servern n„r den „r
: > konfigurerad f”r SSI.

<snip>

Duende responded:
: Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse
: molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero
: eros et accumsan et iusto odio dignissim qui blandit praesent luptatum
: zzril delenit augue duis dolore te feugait nulla facilisi.

<snip>

No, you missed the main point. Trois autemot vel skrivas iriure dolorim in
fondrerit in vulputate velit esse tilläggsinfogning prosequat. Vel illum
dolorim eu feugiat summa facilisis at vero adios, et accumsan et iusto idio
dignissim qui användas praesent luptatum zzril . Vad menas delenit augue
duis dolore te samma folder summa facilisi.

I hope that clears things up.

Lois
 >> Stay informed about: Error when using #include on webpage... 
Back to top
Login to vote
shit

External


Since: Dec 19, 2003
Posts: 355



(Msg. 7) Posted: Mon Apr 19, 2004 10:51 am
Post subject: Re: Error when using #include on webpage... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

in post: <news:n2zgc.56502$mU6.233398@newsb.telia.net>
Arne <arne.luras RemoveThis @telia.com> said:

 > I take it in Swedish Smile

i couldn't find 'swedish'
<a style='text-decoration: underline;' href="http://www.mybodyvibes.com/sex_dictionary_s.html" target="_blank">http://www.mybodyvibes.com/sex_dictionary_s.html</a>


--
b r u c i e<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Error when using #include on webpage... 
Back to top
Login to vote
user398

External


Since: Feb 22, 2004
Posts: 97



(Msg. 8) Posted: Mon Apr 19, 2004 10:51 am
Post subject: Re: Error when using #include on webpage... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

brucie wrote:

 > in post: <news:n2zgc.56502$mU6.233398@newsb.telia.net>
 > Arne <arne.luras DeleteThis @telia.com> said:
 >
 >
  >>I take it in Swedish Smile
 >
 >
 > i couldn't find 'swedish'
<font color=purple> > <a style='text-decoration: underline;' href="http://www.mybodyvibes.com/sex_dictionary_s.html</font" target="_blank">http://www.mybodyvibes.com/sex_dictionary_s.html</font</a>>

Ha,ha, you are dirty minded Smile
You search the wrong place. Look in the dictionary for alcohol, for
Swedish punch (arrack) :-0

--
/Arne

--------------------------------------
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
--------------------------------------<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Error when using #include on webpage... 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
First Webpage - Hi, I've just built my first webpage. Check it out: http://friendpages.com/cgi-bin/public/pages/cover.cgi?pageid=nathanmathers

include file - if my domain is www.homepokergames.com and I want to make the index page a PHP page (so i can use an include file), then where do users go to see my page? if t hey go to www.homepokergames.com does it automatically change to..

SSI and HTML or PHP and include? - My question is this, what do you think is better for a web page. SSI with an html page or include with a php page. ************************************* Webmaster Toolz Start - Enhance - Promote - Make Money http://webmastertoolz.fairmount.nu..

Comments on Webpage - Afternoon Everyone, Just wanted to hear comments on my site (www.thepillman.com). Just so you know it has to do with a pill to enlarge a certain part of a males body, there is partial nudity. Scott

Preload images in an include?? - I´m using an include (ssi) that has a menu in it. The menu is made of rollover images, which i would like to be preloaded .. usually I do this with a js inside the head tag, but since this an include, it has no head tag ... where should i put my..
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]