note 115758 added to function.include

From: Date: Thu, 18 Sep 2014 10:34:24 +0000
Subject: note 115758 added to function.include
Groups: php.notes 
Request: Send a blank email to php-notes+get-200478@lists.php.net to get a copy of this message
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'); } ?> ---- Server IP: 72.52.91.14 Probable Submitter: 93.132.152.194 ---- Manual Page -- http://php.net/manual/en/function.include.php Edit -- https://master.php.net/note/edit/115758 Del: integrated -- https://master.php.net/note/delete/115758/integrated Del: useless -- https://master.php.net/note/delete/115758/useless Del: bad code -- https://master.php.net/note/delete/115758/bad+code Del: spam -- https://master.php.net/note/delete/115758/spam Del: non-english -- https://master.php.net/note/delete/115758/non-english Del: in docs -- https://master.php.net/note/delete/115758/in+docs Del: other reasons-- https://master.php.net/note/delete/115758 Reject -- https://master.php.net/note/reject/115758 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#200478) next »