XCache is a fast, stable PHP opcode cacher that has been proven and is now running on production servers under high load.
https://xcache.lighttpd.net/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.2 KiB
59 lines
1.2 KiB
<?php |
|
|
|
// this is an example only |
|
// write your own config and name it as config.php |
|
|
|
// detected by browser |
|
// $lang = 'en-us'; |
|
|
|
$charset = "UTF-8"; |
|
|
|
// developers only |
|
$show_todo_strings = false; |
|
|
|
// $include_paths = array("/www/my-php-project/"); |
|
// $exclude_paths = array("/www/my-php-project/tmp/"); |
|
$syntaxhiglight = true; |
|
$usecache = false; |
|
//// $datadir is default to ini_get("xcache.coveragedump_directory") |
|
// $datadir = ''; |
|
|
|
function ob_filter_path_nicer($o) |
|
{ |
|
$sep = DIRECTORY_SEPARATOR; |
|
$o = str_replace($_SERVER['DOCUMENT_ROOT'], "{DOCROOT}$sep", $o); |
|
$xcachedir = realpath(dirname(__FILE__) . "$sep..$sep"); |
|
$o = str_replace($xcachedir . $sep, "{XCache}$sep", $o); |
|
if ($sep == '/') { |
|
$o = str_replace("/home/", "{H}/", $o); |
|
} |
|
return $o; |
|
} |
|
|
|
// implement your auth here if needed |
|
// {{{ home made login example |
|
// this is an example only, it's won't work for you without your implemention. |
|
function check_admin_auth() |
|
{ |
|
require("/path/to/user-login-and-permission-lib.php"); |
|
session_start(); |
|
|
|
if (!user_logined()) { |
|
if (!ask_the_user_to_login()) { |
|
exit; |
|
} |
|
} |
|
|
|
user_load_permissions(); |
|
if (!user_is_admin()) { |
|
die("Permission denied"); |
|
} |
|
|
|
return true; |
|
} |
|
|
|
// uncomment: |
|
// check_admin_auth() |
|
// }}} |
|
|
|
?>
|
|
|