可湿性粉剂-配置.php:在一个文件中包含localhost和development以及live站点。
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了可湿性粉剂-配置.php:在一个文件中包含localhost和development以及live站点。相关的知识,希望对你有一定的参考价值。
Source: http://www.websitedesignby.com/programming/wordpress-website-development-work-flow-wp-config-php/if($_SERVER['HTTP_HOST']==’livedomain.com’ || $_SERVER['HTTP_HOST']==’www.livedomain.com’){
define(‘DB_NAME’
, ‘db_name_live’
); // The name of the database define(‘DB_USER’
, ‘
mysql_username_live’
); // Your MySQL username define(‘DB_PASSWORD’
, ‘mysql_password_live’
); // …and password define(‘DB_HOST’
, ‘localhost’
); // db host define(‘DB_CHARSET’
, ‘utf8′
); define(‘DB_COLLATE’
, â€
); define(‘AUTH_KEY’
, ‘put your unique phrase here’
); define(‘SECURE_AUTH_KEY’
, ‘put your unique phrase here’
); define(‘LOGGED_IN_KEY’
, ‘put your unique phrase here’
); }else{
define(‘DB_NAME’
, ‘name_of_db_local’
); // The name of the database define(‘DB_USER’
, ‘mysql_username_local’
); // Your MySQL username define(‘DB_PASSWORD’
, ‘mysql_password_local’
); // …and password define(‘DB_HOST’
, ‘localhost’
); // db host define(‘DB_CHARSET’
, ‘utf8′
); define(‘DB_COLLATE’
, â€
); define(‘AUTH_KEY’
, ‘put your unique phrase here’
); define(‘SECURE_AUTH_KEY’
, ‘put your unique phrase here’
); define(‘LOGGED_IN_KEY’
, ‘put your unique phrase here’
); }
// You can have multiple installations in one database if you give each a unique prefix
$table_prefix = ‘wp_’; // Only numbers, letters, and underscores please!
// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-content/languages.
// For example, install de.mo to wp-content/languages and set WPLANG to ‘de’
// to enable German language support.
/* That’s all, stop editing! Happy blogging. */
require_once(ABSPATH . ‘wp-settings.php’);
以上是关于可湿性粉剂-配置.php:在一个文件中包含localhost和development以及live站点。的主要内容,如果未能解决你的问题,请参考以下文章
删除链接后在可湿性粉剂Nivo滑块
可湿性粉剂添加后重击
如何在自定义帖子类型上使用Woocommerce的二级图像上传Metabox?
PHP Wordpress作者页面在配置文件中包含自定义字段
如何在 Laravel-4 中包含不同环境的自定义配置
如何在文件中包含php别名