Ignore:
Timestamp:
2012-07-27T09:17:42+02:00 (3 years ago)
Author:
Xuefer
Message:

refactor: move htdocs, bin, lib for easier installation

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/htdocs/coverager/config.example.php

    r1052 r1053  
    11<?php
    22
    3 // this is an example only
    4 // write your own config and name it as config.php
     3// DO NOT rename/delete/modify example file which will be overwritten when upgrade
     4// How To Custom Config:
     5// 1. copy config.example.php config.php; edit config.php
     6// 2. upgrading your config.php when config.example.php were upgraded
     7// XCache will load
     8// 1. ../config.default.php
     9// 2. ./config.default.php
     10// 3. ../config.php
     11// 4. ./config.php
    512
    6 // detected by browser
    7 // $lang = 'en-us';
     13// $config['include_paths = array("/www/my-php-project/");
     14// $config['exclude_paths = array("/www/my-php-project/tmp/");
     15$config['syntax_higlight'] = true;
     16$config['use_cache'] = false;
     17//// $config['datadir'] is default to ini_get("xcache.coveragedump_directory")
     18// $config['datadir'] = '';
    819
    9 $charset = "UTF-8";
    10 
    11 // developers only
    12 $show_todo_strings = false;
    13 
    14 // $include_paths = array("/www/my-php-project/");
    15 // $exclude_paths = array("/www/my-php-project/tmp/");
    16 $syntaxhiglight = true;
    17 $usecache = false;
    18 //// $datadir is default to ini_get("xcache.coveragedump_directory")
    19 // $datadir = '';
    20 
    21 function ob_filter_path_nicer($o)
    22 {
    23     $sep = DIRECTORY_SEPARATOR;
    24     $o = str_replace($_SERVER['DOCUMENT_ROOT'],  "{DOCROOT}" . (substr($d, -1) == $sep ? $sep : ""), $o);
    25     $xcachedir = realpath(dirname(__FILE__) . "$sep..$sep");
    26     $o = str_replace($xcachedir . $sep, "{XCache}$sep", $o);
    27     if ($sep == '/') {
    28         $o = str_replace("/home/", "{H}/", $o);
    29     }
    30     return $o;
    31 }
    32 
    33 // implement your auth here if needed
    34 // {{{ home made login example
    35 // this is an example only, it's won't work for you without your implemention.
    36 function check_admin_auth()
    37 {
    38     require("/path/to/user-login-and-permission-lib.php");
    39     session_start();
    40 
    41     if (!user_logined()) {
    42         if (!ask_the_user_to_login()) {
    43             exit;
    44         }
    45     }
    46 
    47     user_load_permissions();
    48     if (!user_is_admin()) {
    49         die("Permission denied");
    50     }
    51 
    52     return true;
    53 }
    54 
    55 // uncomment:
    56 // check_admin_auth()
    57 // }}}
    58 
    59 ?>
Note: See TracChangeset for help on using the changeset viewer.