Changeset 476 for trunk/docs
- Timestamp:
- Apr 26, 2014 5:06:03 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/examples/example.cli.php
r468 r476 5 5 * For details visit the project site: <http://trac.strangecode.com/codebase/> 6 6 * Copyright 2001-2012 Strangecode, LLC 7 * 7 * 8 8 * This file is part of The Strangecode Codebase. 9 9 * … … 12 12 * Free Software Foundation, either version 3 of the License, or (at your option) 13 13 * any later version. 14 * 14 * 15 15 * The Strangecode Codebase is distributed in the hope that it will be useful, but 16 16 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 17 17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 18 18 * details. 19 * 19 * 20 20 * You should have received a copy of the GNU General Public License along with 21 21 * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>. … … 24 24 /* 25 25 * example.cli.php - An example of a command-line interface script using the Strangecode Codebase. 26 * 26 * 27 27 * 28 28 * @author Quinn Comendant <quinn@strangecode.com> … … 39 39 40 40 // First things first. Define the globally used directory paths. 41 // The parent directory of all application DocRoots , such as /home/user/www.example.com/42 define('COMMON_BASE', realpath( '../..'));41 // The parent directory of all application DocRoots. 42 define('COMMON_BASE', realpath(dirname(__FILE__) . '/../')); 43 43 44 44 // Set include path for all templates and libraries. … … 51 51 * CONFIG 52 52 ********************************************************************/ 53 54 // This will disable sessions and things not needed by a cli script. 55 define('_CLI', true); 53 56 54 57 // Include core libraries. … … 96 99 if (!$options) { 97 100 printf("%s: Syntax or usage error. Try '-h' if you are lost.\n", $this_script); 98 die(1); 101 die(1); 99 102 } 100 103 … … 134 137 135 138 OPTIONS: 136 139 137 140 -a Blah blah blah 138 141 -b Blah blah blah
Note: See TracChangeset
for help on using the changeset viewer.