Home > php教程 > PHP源码 > PHP程序核心配置文件一般模式

PHP程序核心配置文件一般模式

PHP中文网
Release: 2016-05-25 17:15:42
Original
1088 people have browsed it

php代码

<?php
/*
 * 文件名:config.php
 * 功  能:程序核心配置文件
 * 日  期:2010-04-30
 * 作  者:web@huqiao.net
 */
if(!defined(&#39;IN_CART&#39;)){
	//防止站外引用
	exit(&#39;Access Denied&#39;);
}

define(&#39;TIME_ZONE&#39;,&#39;PRC&#39;); //默认时区

define(&#39;CHARSET&#39;,&#39;utf-8&#39;); //网站字符集

define(&#39;DB_HOST&#39;,&#39;localhost&#39;); //数据库主机

define(&#39;DB_USER&#39;,&#39;root&#39;); //数据库用户名

define(&#39;DB_PWD&#39;,&#39;&#39;); //数据库密码

define(&#39;DB_NAME&#39;,&#39;testshop&#39;); //数据库名

define(&#39;DB_CHARSET&#39;,&#39;utf8&#39;); //数据库字符集

define(&#39;DB_PREFIX&#39;,&#39;joe_&#39;); //数据库表名前缀

define(&#39;USE_TEMPLATE&#39;,&#39;default/&#39;); //当前使用的模板

define(&#39;TEMPLATE_DIR&#39;,CART_ROOT . &#39;/templates/&#39; .USE_TEMPLATE); //模板文件夹

define(&#39;PUBLIC_DIR&#39;,CART_ROOT . &#39;/public&#39;); //公共文件夹

define(&#39;TEMPLATE_CACHE_DIR&#39;,CART_ROOT . &#39;/data/cache/&#39;); //模板缓存文件夹

define(&#39;TEMPLATE_COMPILE_DIR&#39;,CART_ROOT . &#39;/data/compile/&#39;); //模板缓存文件夹
?>
Copy after login
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template