php wp-config-local.php(WordPress)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php wp-config-local.php(WordPress)相关的知识,希望对你有一定的参考价值。

<?php
define( 'DB_NAME', 'LOCAL_DATABASE_NAME_HERE' );
define( 'DB_USER', 'root' );
define( 'DB_PASSWORD', '' );
define( 'DB_HOST', 'localhost' );
/* Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
/* THIS IS CUSTOM CODE CREATED AT ZEROFRACTAL TO MAKE SITE ACCESS DYNAMIC */
$currenthost = "http://".$_SERVER['HTTP_HOST'];
$currentpath = preg_replace('@/+$@','',dirname($_SERVER['SCRIPT_NAME']));
$currentpath = preg_replace('/\/wp.+/','',$currentpath);
define('WP_HOME',$currenthost.$currentpath);
define('WP_SITEURL',$currenthost.$currentpath);
define('WP_CONTENT_URL', $currenthost.$currentpath.'/wp-content');
define('WP_PLUGIN_URL', $currenthost.$currentpath.'/wp-content/plugins');
define('DOMAIN_CURRENT_SITE', $currenthost.$currentpath );
@define('ADMIN_COOKIE_PATH', './');

/* debug must be set to true for {{ dump() }} to work. However, if excessive php warnings are driving you nuts, switch debug to false */
define('WP_DEBUG', true);

以上是关于php wp-config-local.php(WordPress)的主要内容,如果未能解决你的问题,请参考以下文章

php5.5安装及phpmyadmin&nginx配置php模块

CentOS安装php及其扩展

夯实PHP基础系列PHP正则表达式

php实用函数

nginx+php+redis+ssl 配置

php5.5安装及phpmyadmin&nginx配置php模块