我有一个使用php和mysql的托管软件包,并且ive在访问数据库并获取信息的服务器上安装了wordpress。我的网站按预期工作。通过xampp访问外部mysql数据库
但我试图升级某些方面,但不想在我的网站的实时版本上尝试新的东西。
所以我想用xampp来测试我的网站,但xampp不会连接外部数据库。
即时通讯假设其与php.ini或mysql配置有关,但我不知道如何允许它。
基本上我需要通过xampp访问我的托管服务提供商的mysql数据库!
任何想法?
编辑:
警告信息XAMPP是返回是
Warning: Cannot modify header information - headers already sent by (output started at C:\Users\Alex Morley-Finch\Dropbox\Shared\Projects\htdocs\A3MediaFinal\templates\side.php:71) in C:\Users\Alex Morley-Finch\Dropbox\Shared\Projects\htdocs\A3MediaFinal\news\wp-includes\functions.php on line 3286
错误建立一个数据库连接
线3286:
function dead_db() {
global $wpdb;
// Load custom DB error template, if present.
if (file_exists(WP_CONTENT_DIR . '/db-error.php')) {
require_once(WP_CONTENT_DIR . '/db-error.php');
die();
}
// If installing or in the admin, provide the verbose message.
if (defined('WP_INSTALLING') || defined('WP_ADMIN'))
wp_die($wpdb->error);
// Otherwise, be terse.
status_header(500);
nocache_headers();
//3286 header('Content-Type: text/html; charset=utf-8');
}
到了第3286行,页面的标题已经被设置,因此你不能改变它们。删除该行,它应该为你工作。 –