httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin French <jus...@indent.com.au>
Subject Re: [users@httpd] Creating custom tags
Date Tue, 08 Oct 2002 14:20:23 GMT
on 08/10/02 11:59 PM, Carlos Costa Portela (ccosta@servidores.net) wrote:

> I need create my own tags, and I wondering if I can do this via
> Apache modules (mod_perl, for example). What I need is that, for example,
> the tag
> 
> <calendar month="Dec" />
> 
> be interpreted by Apache to put the month in the browser.


Not sure if it can be done through Apache directly, but it could definitely
be done with PHP by typing:

<p>Current month is <?=date('M')?>.</p>

Which would print to the browser

<p>Current month is Oct</p>


date('F') would produce October.


You'll need:

PHP installed and running.  Short tags config directive should be set to
true in PHP.ini, and you'll need to parse each page through the php engine
by either:

a) naming all your pages *.php
b) editing httpd.conf to parse *.html pages through PHP


Pretty sure there might be a SSI solution, but can't piece it all
together....


Justin French


---------------------------------------------------------------------
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


Mime
View raw message