昨天和今天安装了一些新的WordPress插件安装以后发现settings里面的General页显示不正常,看了源码以后发现居然时区的下拉列表(options)出不来导致的问题
初步怀疑是因为数据库修改所致..因为我把blog从http://www.andystar.net/blog/迁移到了http://andystar.net/ 呵生命在于折腾嘛(我会再写一篇记录完整的过程的)~所以就查了下数据库发现该修改的都修改了..怪了,那没办法了就一点点找原因吧..
首先拿 http://andystar.net/wp-admin/options-general.php 他开刀了,在里面出问题的地方下断点 可以用 print “testing”; 然后看源码的方式,最后找出来是wp_timezone_choice() 这个函数这里执行有问题后面的程序都不执行了, 我也查了error_log 可是没有错误..郁闷但肯定是他的问题,那就找吧在大约3190行有wp_timezone_choice() 的定义调试了一下数据库的数据也确实没问题,后来发现个神奇的东西:
// usort($zonen, create_function(
// ‘$a, $b’, ‘
// $t = create_function(\’$s\’, \’return translate(str_replace(“_”, ” “, $s), “continents-cities”);\’);
// $a_continent = $t($a["continent"]);
// $b_continent = $t($b["continent"]);
// $a_city = $t($a["city"]);
// $b_city = $t($b["city"]);
// $a_subcity = $t($a["subcity"]);
// $b_subcity = $t($b["subcity"]);
// if ( $a_continent == $b_continent && $a_city == $b_city )
// return [...]

Linode-很不错的VPS