473,549 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Nested SSI with passed variable


I'm trying to implement a nested SSI file that has in it the line:

<!--#include virtual="<!--#echo var='VAR_locati on'-->pagelinks.tx t" -->

where VAR_location is a variable set in the "calling" file. (I.e., the
original file sets VAR_location equal to a directory path, then #includes
the file in which the above line appears). I can #echo the variable
correctly from the included file, and typing the directory path explicitly
in this #include generates the correct result, but the #include directive
as written above generates "[an error occured while processing this
directive]" error. I don't know much about scripting, so there might be
some really fundamental error in my syntax with the quotes, or something.
Anyone care to enlighten me? TIA.

D.

Dennis M. Straussfogel, Ph.D.
Aerospace Engineering Consultant
Jul 20 '05 #1
2 2549
Dennis M. Straussfogel wrote:
I'm trying to implement a nested SSI file that has in it the line:

<!--#include virtual="<!--#echo var='VAR_locati on'-->pagelinks.tx t"
-->


include directives are parsed before any script is executed on your web
server

--
William Tasso - http://WilliamTasso.com
Jul 20 '05 #2
In article <dm************ ******@news.abc com.bc.ca>, dm*@bcgroup.net
(Dennis M. Straussfogel) wrote:
I'm trying to implement a nested SSI file that has in it the line:

<!--#include virtual="<!--#echo var='VAR_locati on'-->pagelinks.tx t" -->

where VAR_location is a variable set in the "calling" file. (I.e., the
original file sets VAR_location equal to a directory path, then #includes
the file in which the above line appears). I can #echo the variable
correctly from the included file, and typing the directory path explicitly
in this #include generates the correct result, but the #include directive
as written above generates "[an error occured while processing this
directive]" error. I don't know much about scripting, so there might be
some really fundamental error in my syntax with the quotes, or something.
Anyone care to enlighten me? TIA.


Okay, I've answered my own question. For those more neophyte than me that
might be wondering, the solution is to set an new variable in the included
file

<!--#set var="pagelinks" value="pagelink s.txt" -->

then concatenate the two variables in the #include directive (and get rid
of the #echo altogether, which I suspected didn't make sense to begin
with)

<!--#include virtual="$VAR_l ocation$pagelin ks" -->

Viola! There is probably a very simple way that experienced scripters
would use to do the concatenation without defining a new variable, but
this works.

Dennis M. Straussfogel, Ph.D.
Aerospace Engineering Consultant
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3342
by: r rk | last post by:
I am trying to write a utility/query to get a report from a table. Below is the some values in the table: table name: dba_daily_resource_usage_v1 conn|loginame|dbname|cum_cpu|cum_io|cum_mem|last_batch ------------------------------------------------------------ 80 |farmds_w|Farm_R|4311 |88 |5305 |11/15/2004 11:30 80 ...
4
4414
by: Vedanta Barooah | last post by:
greetings.... in a python nested class is it possible to change the value of the parent class's variable without actually creating an instance of the parent class, consider this code: class mother: x=0 def __init__(self): self.x=1
3
2392
by: Erik Bongers | last post by:
Hi, Nested classes only seem to be able to access static members of the surrounding class : class SurroundingClass { public: class InnerClass { public:
12
2196
by: abs | last post by:
Hi all. The example code is here http://instaltech.com.pl/_drzewo/test.html. I'd like to create a function which will have <li> object (id="myLI" in example code) passed as a parameter and will recursively hide (css display: none) all ULs nested below passed LI. No matter if such ULs are nested in LI passed as a parameter or in its children...
2
2342
by: Quinnie | last post by:
Hi, I have a homework assignment that I'm so confused and really need help with. Here's the description, any help would be appreciated. Thanks! Assume we have a statically-scoped language with nested procedures. That is, a procedure (or function) can contain local procedures (and functions). Procedures can be nested arbitrarily deep....
2
2903
by: William Ahern | last post by:
So, I recently learned that Solaris doesn't, or doesn't seem, to provide err.h. On some platforms err.h provides simple wrappers for error printing to stderr. One of which, err(), has this signature: void err(int exit_code, const char *fmt, ...); It will print fmt + ... to stderr, tacking on a colon, the result of strerror(errno), and a...
37
2750
by: Tim N. van der Leeuw | last post by:
Hi, The following might be documented somewhere, but it hit me unexpectedly and I couldn't exactly find this in the manual either. Problem is, that I cannot use augmented assignment operators in a nested scope, on variables from the outer scope: PythonWin 2.4.3 (#69, Mar 29 2006, 17:35:34) on win32. Portions Copyright 1994-2004 Mark...
78
4899
by: Josiah Manson | last post by:
I found that I was repeating the same couple of lines over and over in a function and decided to split those lines into a nested function after copying one too many minor changes all over. The only problem is that my little helper function doesn't work! It claims that a variable doesn't exist. If I move the variable declaration, it finds the...
1
1575
by: Goldie | last post by:
Can anyone offer advice on how to do a nested loop with vb I need the loop nested in the main loop to be passed a variable from the parent loop for SQL purposes. eg: parent selects all customer_id's and other information child loop needs the customer_id to do SELECT * FROM table WHERE customer_id = '@from_parent_loop'
0
7472
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7986
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7504
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7832
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6074
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3518
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3499
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1083
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
786
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.