Skip to content

Instantly share code, notes, and snippets.

@splittingred
Created May 13, 2011 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save splittingred/970884 to your computer and use it in GitHub Desktop.
Save splittingred/970884 to your computer and use it in GitHub Desktop.
getTpl snippet
<?php
/**
* Use like so:
* [[!getTpl? &file=`/path/to/my/file`]]
*/
$o = '';
if (file_exists($file)) {
$o = file_get_contents($file);
} else { $o = 'File not found: '.$file; }
return $o;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment