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
(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
User Contributed Notes
5.2.8. Adding PHP Scripts to Your Campsite Templates
There are no user contributed notes for this page.