Skip to content

Instantly share code, notes, and snippets.

@danimbrogno
Created February 19, 2015 20:12
Show Gist options
  • Save danimbrogno/4ebf4f5c22eef8a935a3 to your computer and use it in GitHub Desktop.
Save danimbrogno/4ebf4f5c22eef8a935a3 to your computer and use it in GitHub Desktop.
Output Buffering Example
public static function displaySvg($handle){
$svg_path = sprintf('images/svg/%s.svg',$handle);
ob_start();
include(Theme::getResourcePath($svg_path));
$svg = ob_get_contents();
ob_end_clean();
return $svg;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment