note 115758 deleted from function.include by philip

From: Date: Tue, 26 Apr 2016 21:42:33 +0000
Subject: note 115758 deleted from function.include by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-205345@lists.php.net to get a copy of this message
Note Submitter: Jochen mauch at mail dot de ---- Typically I use PHP to build myself a rudimentary CMS, i.e. one not as powerful and GUI-ish to use as full-blown systems like e.g. Joomla or Typo3 for the sake of not having to dive exhaustingly into how to use these systems, or, in less words: for the sake of simplicity. Thus I wrote a function to include snippets based on an optional parameter specifying the snippets directory and two shorthands for frequently used snippets: <?php /* include function */ function includeSnippetHere($name, $snippetDir = 'snippets/') { include $snippetDir.$name; } /* shorthands */ function abbrSSL() { includeSnippetHere('abbrSSL.htm'); } function KonqOnly() { includeSnippetHere('KonqOnly.htm'); } ?>

« previous php.notes (#205345) next »