Location: PHPKode > projects > Openology PHP Application Integration > openology/install/config_base_nodata_bak.php
<?php
/***************************************************************************
 *   copyright            : (C) 2006 The openology Group
 *   email                : hide@address.com
 *
 *   $Id
 *
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

//不一定要求你用手工更改配置,但看一下这个文件对你更好的使用本系统是有帮助的
//$registerGlobals = @ini_get("register_globals");
//$isUrlOpen = @ini_get("allow_url_fopen");

if(!$registerGlobals) require_once(dirname(__FILE__)."/register_extern.php");
//管理员账号
$user = "~name~";
$pass = "~pass~";
//网站根目录的绝对路径和站点网址

$base_dir="C:/Program Files/xampp/htdocs";
$base_url = "";

//数据库连接信息
$dbname = "~dbname~";
$dbhost = "~dbhost~";
$dbusername = "~dbuser~";
$dbuserpwd = "~dbuserpwd~";

//动态文件的目录,这个目录是用于存放计数器、投票、评论等程序的必要动态程序
$art_php_dir = "~phpdir~";

//数据备份目录
$bak_dir = $art_php_dir."/php/bak";

//网页首页链接和名称
$index_url="~indexurl~";
$index_name="首页";


/////////////////////////////////////////////////////////////
//相关的配置选项结束
//以下为常用函数
/////////////////////////////////////////////////////////////*/

//-----中文字符截取--------
function cn_substr($str,$len)
{
  return cn_midstr($str,0,$len);
}
function cn_midstr($str,$start,$len){
  $i=0;
  $dd=0;
  while($i<$start)
  {
  		$ch=substr($str,$i,1);
  		if(ord($ch)>127) $dd++;
  		else $dd=$dd+2;
  		$i++;
  }
  if($dd%2!=0) $start++;
  $i=$start;
  $endnum = $start+$len;
  while($i<$endnum)
  {
    $ch=substr($str,$i,1);
    if(ord($ch)>127) $i++;
      $i++;
  }
  $restr=substr($str,$start,$i-$start);
  return $restr;
}
//-------返提示信息----------
function ShowMsg($msg,$gotoPage)
{
	$msg = str_replace("'","`",trim($msg));
	$gotoPage = str_replace("'","`",trim($gotoPage));
	echo "<script language='javascript'>\n";
	echo "alert('$msg');";
	if($gotoPage=="back")
	{
		echo "history.go(-1);\r\n";
	}
	else if(ereg("^-",$gotoPage))
	{
		echo "history.go($gotoPage);\r\n";
	}
	else if($gotoPage!="")
	{
		echo "location.href='$gotoPage';\r\n";
	}
	echo "</script>";
}
if (!session_is_registered('session_lang'))
{
    session_register('session_lang');
    $_SESSION['session_lang'] = 'zh-cn';
}

if (isset($_GET['lang']))
{
    $_SESSION["session_lang"] = $_GET['lang'];
}

$file_lang = dirname(__FILE__).'/language/'.$_SESSION["session_lang"].'.php';

include "$file_lang";

?>
Return current item: Openology PHP Application Integration