#!/bin/env php PHK Manager - File: /scripts/main.php
Package Home

PHK Manager

PHK Home

File: /scripts/main.php

Size:1324
Storage flags:

<?php
//=============================================================================
//
// Copyright Francois Laupretre <phk@tekwire.net>
//
//   Licensed under the Apache License, Version 2.0 (the "License");
//   you may not use this file except in compliance with the License.
//   You may obtain a copy of the License at
//
//       http://www.apache.org/licenses/LICENSE-2.0
//
//   Unless required by applicable law or agreed to in writing, software
//   distributed under the License is distributed on an "AS IS" BASIS,
//   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//   See the License for the specific language governing permissions and
//   limitations under the License.
//
//=============================================================================

namespace PHK {

// When used outside of a PHK package, the main script includes every other
// scripts. When used in a PHK package, we use the autoloader.


try
{
ini_set('display_errors',true);
Mgr::checkPhpVersion();

$args=$_SERVER['argv'];
array_shift($args);
CLI\Cmd::run($args);
}
catch(\
Exception $e)
    {
    if (
getenv('SHOW_EXCEPTION')!==false) throw $e;
    else echo 
"*** ERROR: ".$e->getMessage()."\n\n";
    exit(
1);
    }

// End of namespace
//===========================================================================

For more information about the PHK package format: http://phk.tekwire.net