TiP - Web框架


未知
跨平台
PHP

软件简介

TiP 是一个基于 PHP/MySQL 的 用于构建Web网站的通用框架,主要面向开发人员、有经验的Web管理员。

示例代码:

<?php  
// Define the TiP environment  
require_once './tip/TIP.php';

// Modules configuration  
// Change the 'database', 'user' and 'password' items  
// to reflect your MySQL configuration  
$cfg = array(  
  'main'                  => array(  
    'type'                => array('module', 'application'),  
    'title'               => 'Article demo',  
    'description'         => 'A more useful example',  
    'keywords'            => 'tip,article,demo',  
    'engine'              => array(  
      'type'              => array('template_engine', 'rcbtng')  
    ),  
    'data_engine'         => array(  
      'type'              => array('data_engine', 'mysql'),  
      'server'            => 'localhost',  
      'database'          => '???',  
      'user'              => '???',  
      'password'          => '???'  
    )  
  ),

  'article'               => array(  
    'type'                => array('module', 'content'),  
    'anonymous_privilege' => TIP_PRIVILEGE_ADMIN,  
    'default_privilege'   => TIP_PRIVILEGE_ADMIN,  
    'form_options'        => array(  
      'add'               => array('captcha' => true),  
      'edit'              => array('captcha' => true)  
    )  
  )  
);

// "main" module instantiation  
TIP_Type::getInstance('main');

// Application execution  
$GLOBALS[TIP_MAIN]->go();  
?>