You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Robert J. Liguori" <li...@enroute-computer.com> on 2003/04/17 01:00:32 UTC

[users@httpd] HTML Global Variable or command line execution.

Hello,

I have a version number that is represented in several HTML files.  This 
version numbers remains the same for each file.  When I need to make a 
change for a new distribution, I have to change everyfile, (i.e. change 
1.6 to 1.7).

Is there a way to make a global variable, or cat out the contents of a 
file (i.e. 'cat version_file' where version_file include text 1.7).

Are is there another way, that I am completely missing the boat?

Note: The goal is to change the version id in one place, and have 7 
files updated.

I'm also curious in general on how you can execute a command line 
argument from an HTML document.

Thanks,

Robert.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTML Global Variable or command line execution.

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 16 Apr 2003, Robert J. Liguori wrote:
> I have a text string that is in several HTML files.
> I wish to change this string in one place, and have all other files
> reference this change.
>
> Is there a way to make a global variable?
> Is there a way to cat out the contents of a file and pass that to the
> HTML file?

This is probably the most common and basic problem in website design.
There are TONS of different ways to deal with it.  One way is to use a
server-side language like mod_include (included with apache), php, or
mod_perl to process the files as they are sent.

But if your pages don't change frequently, I'd instead recommend using a
pre-processor like m4 to generate static pages.  It is simpler, and puts
much less load and complication on your web server.

People in this group could provide more details on either technique.  But
since this is a general web-admin question and has very little to do with
apache in particular, you might have better luck on a more general
webmaster forum.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] HTML Global Variable or command line execution.

Posted by "Robert J. Liguori" <li...@enroute-computer.com>.
(Trying to clarify question).

I have a text string that is in several HTML files.
I wish to change this string in one place, and have all other files 
reference this change.

Is there a way to make a global variable?
Is there a way to cat out the contents of a file and pass that to the 
HTML file?

Or is there another way?

Note: The goal is to change the string in one place, and have 7 files 
show that string.

I'm also curious in general on how you can execute a command line 
argument from an HTML document.

Thanks,

Robert.

Robert J. Liguori wrote:

> Hello,
>
> I have a version number that is represented in several HTML files. 
> This version numbers remains the same for each file. When I need to 
> make a change for a new distribution, I have to change everyfile, 
> (i.e. change 1.6 to 1.7).
>
> Is there a way to make a global variable, or cat out the contents of a 
> file (i.e. 'cat version_file' where version_file include text 1.7).
>
> Are is there another way, that I am completely missing the boat?
>
> Note: The goal is to change the version id in one place, and have 7 
> files updated.
>
> I'm also curious in general on how you can execute a command line 
> argument from an HTML document.
>
> Thanks,
>
> Robert.
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server 
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
> .
>



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org