【发布时间】:2009-03-14 17:23:00
【问题描述】:
有人能告诉我我做错了什么吗?我要疯了,以下代码在 localhost/WIN 上完美运行,当我在 webhost/linux 上尝试时,它会发出警告:
$lines = file('english.php');
foreach($lines as $line) {
$matches=array();
if (preg_match('/DEFINE\(\'(.*?)\',\s*\'(.*)\'\);/i', $line, $matches)) {
$keys[] = $matches[1];
$values[] = $matches[2];
}
}
$lang = array_combine($keys, $values);
当我在虚拟主机上测试时:
Warning: array_combine() expects parameter 1 to be array, null given in /home/xx/public_html/xx on line 616
但在本地服务器(windows xp)上它运行完美。我不知道我做错了什么,请帮我解决这个噩梦:(
谢谢。
【问题讨论】: