Bard College at Simon's Rock: the Early College
  1. Home
  2. Guide
  3. How To
  4. Editors
  5. Admin
  6. PHP

PHP

Includes

Include PHP in an include file. 

  1. Duplicate existing plain text file in /_resources/includes
  2. Rename and edit code
  3. Insert into template by using:
<xsl:copy-of select="ou:include-file('/_resources/includes/footer.inc', 'common-footer')"/>

Assets

  • PHP needs to be wrapped for XSL in the assets files. The normal <?php  will not work.
  • Include the server root on includes.
  • PHP with “>” or “<" must be put in PHP files not an asset.
  • Some PHP won't display until published.
  • Place PHP in _resources/php/
<php> include $_SERVER['DOCUMENT_ROOT']. '/training/date.php'; </php>