Skip to content

Instantly share code, notes, and snippets.

@Da-Fecto
Created September 13, 2015 08:53
Show Gist options
  • Save Da-Fecto/1cb693bcfa1a15fb9c40 to your computer and use it in GitHub Desktop.
Save Da-Fecto/1cb693bcfa1a15fb9c40 to your computer and use it in GitHub Desktop.
<?php
function getPartial($path_to_file) {
ob_start();
include($path_to_file);
return ob_get_clean();
}
$partial = getPartial($config->urls->templates . 'partials/myfile.php');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment