Custom Open Tags

From: Date: Wed, 01 Dec 2004 21:16:25 +0000
Subject: Custom Open Tags
Groups: php.general 
Request: Send a blank email to php-general+get-203270@lists.php.net to get a copy of this message
Hi folks Does anybody know whether there's a way to tell PHP to accept an alternative open tag like for instance <?mytag or <?mc along with the normal <?php tag? I'm looking for a way to have two kinds of PHP code in a page. The first kind tagged <?mc ... ?> contains the PHP code to manage page elements (like includes, menus etc) while the second kind tagged <?php ... ?> contains normal PHP code for dynamic pages (like DB stuff). A page resides on the Staging (Virtual) Host and contains both kind of tags. When viewing the page on the Staging Host, both open tags are executed. Yet when publishing a page to the Production (Virtual) Host, the mc-tags are executed (and thus complete the page design) while the php-tags are left untouched (as they contain the dynamic stuff). Sounds more complicated than it is :-)
Thanks for your hints,    -sven


« previous php.general (#203270) next »