Author |
Topic |
Deleted
deleted
4116 Posts |
Posted - 16 May 2001 : 13:29:09
|
quote:
NOT ALL SERVERS ALLOW SSI !!
The #INCLUDE directive is supported by ASP, not the others (echo, config, fsize, etc). So if a server supports ASP (a must for Snitz) then the #INCLUDE must be supported. Am I wrong?
Bulent Ozden History Foundation of Turkey
Edited by - bozden on 20 April 2002 09:23:56< |
|
|
paco
Junior Member
Spain
187 Posts |
Posted - 17 May 2001 : 04:08:42
|
Snitz uses many includes, so if it works on a server, that server supports includes. I don't think any would support ASP and don't allow you to do SSI.
Regards, Paco
< |
|
|
inworg
Junior Member
Italy
153 Posts |
Posted - 17 May 2001 : 04:11:43
|
#INCLUDE directive is only a type of SSI. The complete set of SSI comands allows conditional includes. #INCLUDE directive in ASP as follow
if x=1 then #INCLUDE A.INC elseif X=2 then #INCLUDE B.INC else #INCLUDE C.INC end if
even include A.INC, B.INC, C.INC so the code get big and slowly.
< |
|
|
paco
Junior Member
Spain
187 Posts |
Posted - 17 May 2001 : 05:14:35
|
quote: ... The complete set of SSI comands allows conditional includes...
if x=1 then #INCLUDE A.INC elseif X=2 then #INCLUDE B.INC else #INCLUDE C.INC end if
That doesn't work that way, as includes are processed before ASP and all three files will be included in the code.
Regards, Paco
< |
|
|
inworg
Junior Member
Italy
153 Posts |
Posted - 17 May 2001 : 05:22:49
|
Sorry Paco, maybe I'm going wrong but I know that #INCLUDE directive under ASP is only a system to simplify code and share a part of it with other ASP pages, so IIS does this: a) Loads ASP page b) Pre-process it to load #INCLUDES in the right place c) Runs this merged code
Well, this means that ALL #INCLUDES are loaded and are in memory
...I repeat... maybe I'm in wrong... Regards...
< |
|
|
paco
Junior Member
Spain
187 Posts |
Posted - 17 May 2001 : 06:24:08
|
I'm not sure you got the point.
The file ssinc.dll is used to process the #include directive, so the complete page, with ALL includes added, is LATER processed by ASP. Thats why things like
<!-- #include file="<%=myfile%>" -->
don't work because includes are processed first and then ASP code. There's no point in doing:
if a then include a else include b
because a and b will be included even before procesing the if.
Regards, Paco
< |
|
|
inworg
Junior Member
Italy
153 Posts |
Posted - 17 May 2001 : 07:12:53
|
Ok, Paco maybe that I don't speak a good english... I apologize!
Your code doesn't work because quote: <!-- #include file="<%=myfile%>" -->
can work ONLY if main ASP file has been executed BEFORE the #INCLUDE directive. It doesen't! I wrote that #include directive is pre-processed (=loaded and NOT executed) BEFORE execute main ASP file. After loaded included files THEN all code (ASP + INCLUDES) will be executed.
U can try this:
file: Test.asp
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> </HEAD>
<BODY> <% DIM A A=100 %> <!--#include file="A.inc"--> <% = A %> </BODY> </HTML>
file: A.INC
<% A=A+200 %>
Launch in your browser http://localhost/test.asp
voilà: A=300 !!!
If the INCLUDE file was been executed BEFORE main ASP file the result must had 100.
All Above means that the executed code is like this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> </HEAD>
<BODY> <% DIM A A=100 %> <% A=A+200 %> <% = A %> </BODY> </HTML>
Bye
P.S. ahhhhh... Microsoft... Microsoft...
Edited by - inworg on 17 May 2001 07:17:05< |
|
|
BuffyNET
Junior Member
United Kingdom
126 Posts |
Posted - 17 May 2001 : 07:26:33
|
That is what Paco was saying in the first place
Neil< |
|
|
inworg
Junior Member
Italy
153 Posts |
Posted - 17 May 2001 : 07:37:05
|
Ok... I apologize for my bad english
well so we agree that the #INCLUDE directive is a good system for internationalization ONLY if used with a language at once for each page and each user as I wrote in http://www.inworg.com/forum.pdf
P.S. Sorry...
< |
|
|
inworg
Junior Member
Italy
153 Posts |
Posted - 17 May 2001 : 07:49:33
|
I try to give U an idea how my system works with an example....
a generic link into default.asp... HREF="topic<%=LangStr%>.Asp....."
this, when is executed becomes like this:
HREF="topicUK.Asp....."
Second Step: file: TopicUK.Asp
'Is like this, if U agree with arrays LStr(1)="Now is" LStr(2)="kkkk" LStr(3)="Bye" LStr(4)="hhhh" 'This file is common for each language and contains the real code of the page <!-- #INCLUDE FILE="TOPIC.ASP" -->
file: Topic.Asp
....... ... <% LStr(1) & now()%><HREF..... ...... LStr(3) .....
Is now the explanation cleany?
< |
|
|
paco
Junior Member
Spain
187 Posts |
Posted - 17 May 2001 : 08:03:30
|
quote: Is now the explanation cleany?
Yes
< |
|
|
inworg
Junior Member
Italy
153 Posts |
Posted - 17 May 2001 : 08:28:06
|
I apologize again for my bad english. So let me know what do u think about this system and share your ideas!
< |
|
|
paco
Junior Member
Spain
187 Posts |
Posted - 17 May 2001 : 09:32:06
|
First, check this topic about ideas to solve this problem:
http://forum.snitz.com/forum/link.asp?TOPIC_ID=9447
The hard part comes from the fact that we can not use ASP 3.0 (no Server.execute ) and we can not use FSO .
About your solution: It could work
Edited by - paco on 17 May 2001 09:36:47< |
|
|
inworg
Junior Member
Italy
153 Posts |
Posted - 17 May 2001 : 10:51:22
|
Sorry Paco... but why we need ASP 3.0 ? I think, about my idea, only to upload language files to server.... I don't care that due to use #include is required FSO... I don't understand the problem...
< |
|
|
Reinsnitz
Snitz Forums Admin
USA
3545 Posts |
Posted - 17 May 2001 : 11:00:56
|
Inwrong... please read both threads carefuly before asking to many questions... most of us have answered the same questions over and over lately.
Reinsnitz (Mike) ><)))'> Need a Mod? "Therefore go and make disciples of all nations,..." Matthew 28:19a< |
|
|
Topic |
|