PHP Classes

File: Platform/config.php

Recommend this page to a friend!
  Classes of Asher Wolfstein   Platform_pear   Platform/config.php   Download  
File: Platform/config.php
Role: Configuration script
Content type: text/plain
Description: Platform configuration file
Class: Platform_pear
Check whether a given PEAR package is installed
Author: By
Last change: typo
Date: 17 years ago
Size: 3,827 bytes
 

Contents

Class file image Download
<?php
/*------------------------------------------------------------------------------
// File: [Platform/]config.php
// Description: PHP 3, 4, 5 platform configuration values
// Purpose: This file contains some platform specific configuration info
// Version: 1.0
// Application: PHCL-WTK
// Author: Asher Kadar Wolfstein
// Email: asher@asherwolf.com
// Homepage: http://www.asherwolf.com/projects/php/platform/index.html
//------------------------------------------------------------------------------
//
// ALL CODE AND (GENERATED) DOCUMENTATION
// IS COPYRIGHT © 2007 WOLFSTEIN CONSULTING (COLORADO)
//
// LICENSE INFORMATION
//
// http://www.asherwolf.com/code_license_1.php?p=Platform_conf&l=lgpl&l2=c30
//
// THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY INCLUDING THE IMPLIED
// WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE.
//
// THIS FILE IS PART OF 'Platform_conf'.
//
// 'Platform_conf' IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR
// MODIFY IT UNDER THE TERMS OF THE GNU LESSER GENERAL PUBLIC LICENSE AS
// PUBLISHED BY THE FREE SOFTWARE FOUNDATION;
//
// 'Platform_conf' IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
// BUT WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
// MERCHANTIBILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE
// GNU LESSER GENERAL PUBLIC LICENSE FOR MORE DETAILS.
//
// YOU SHOULD HAVE RECEIVED A COPY OF THE GNU LESSER GENERAL PUBLIC LICENSE
// ALONG WITH 'Platform_versioning'; IF NOT, WRITE TO THE FREE SOFTWARE
// FOUNDATION, INC., 51 FRANKLIN ST, FIFTH FLOOR, BOSTON, MA 02110-1301 USA
//
// http://www.opensource.org/licenses/lgpl-license.php
//
// FURTHER LICENSED UNDER THE CREATIVE COMMONS ATTRIBUTION 3.0 LICENSE
//
// http://creativecommons.org/licenses/by/3.0/
//
//------------------------------------------------------------------------------
// Revision History
//------------------------------------------------------------------------------
// Format: strftime - %D
// 07/01/2007 Created - Asher Wolfstein
//
//----------------------------------------------------------------------------*/

/**
 * PHP 3, 4, 5 platform configuration values
 *
 * This file contains some platform specific configuration info
 *
 * @author Asher Wolfstein <asher@asherwolf.com>
 * @copyright Copyright &copy; 2007, Wolfstein Consulting (Colorado).
 * @license http://www.asherwolf.com/code_license_1.php?p=Platform_conf&l=lgpl&l2=c30 License Information
 * @package platform
 * @version 1.0
 * @subpackage configuration
 * @category configuration
 */

/**
 * PLATFORM_WINDOWS is true if running Windows
 *
 * This is important for PLATFORM_DIR_SEP
 *
 * @name PLATFORM_WINDOWS
 */
define( 'PLATFORM_WINDOWS', ( strpos( strtolower( $os ), 'win' ) !== false &&
                               
strpos( strtolower( $os ), 'darwin' ) === false ) ?
                                   
true :
                                   
false );

if (
defined( 'DIRECTORY_SEPARATOR' ) ) {
   
/**
     * PLATFORM_DIR_SEP (directory seperator)
     *
     * Because OS 7, 8, and 9 don't really have PHP available for them, we don't
     * have to worry about their respective directory separators (:'s)
     *
     * @name PLATFORM_DIR_SEP
     */
   
define( 'PLATFORM_DIR_SEP', DIRECTORY_SEPARATOR );
} else {
    if (
PLATFORM_WINDOWS ) {
       
define( 'PLATFORM_DIR_SEP', '\\' );
    } else {
       
define( 'PLATFORM_DIR_SEP', '/' );
    }
}

if ( !
defined( 'PATH_SEPARATOR' ) ) {
   
// not perfect, use ; if necessary etc.
   
    /**
     * The path separator for the include_path
     *
     * @name PLATFORM_PATH_SEPARATOR
     */
   
define( 'PLATFORM_PATH_SEPARATOR', ':' );
} else {
   
define( 'PLATFORM_PATH_SEPARATOR', PATH_SEPARATOR );
}

/**
 * True if this file has been included
 *
 * @name PLATFORM_CONFIG_CONF
 */
define( 'PLATFORM_CONFIG_CONF', true );

?>