Campsite 2.3 User Guide

Campsite 2.3 User Guide

Select your language:  
    Search:   
<5.2.7. Environmental Control with Campsite Templates        5.3. Template Language Reference>

Print / Download:
Available languages: english Last update: 2005-08-05 22:07:19

5.2.8. Adding PHP Scripts to Your Campsite Templates

To execute PHP scripts from your Campsite templates, you need to install the PHPWrapper. (You can download PHPWrapper 1.1.2 from this location: https://www.campware.org/look/campware/download/campsite_phpwrapper-1.1.2.tar.gz)

All PHP code that comes from Campsite, equally from static or dynamic content
will be executed. You can use

<?php include ("scriptname"); ?>
or
<!** include scriptname>. I prefer first because if PHP didn't work (apache
missconfiguration) this will hide the included PHP-source. Make sure that
PHP-code is opened by
<?php and ended by ?>
(also <? if short_open_tag=on in php.ini).

Caution:
PHPWrapper enables the injection of code into content, so make sure that you trust your editors. Be careful that no user-input is printed by Campsite (e.g. <!** print User ...>), or your visitors will be able to inject PHP code there.


add a note add a note User Contributed Notes
5.2.8. Adding PHP Scripts to Your Campsite Templates
There are no user contributed notes for this page.

<5.2.7. Environmental Control with Campsite Templates 5.3. Template Language Reference>

  Last update: 2005-08-05 22:07:19
Website powered by Docmint Last update: 2005-08-05 22:07:19
Total page time: 0.797375917435