只是将网站从本地计算机迁移到登台服务器。
奇怪的是,即使堆栈跟踪看起来正确,主题也没有加载函数:
[15-Dec-2017 00:22:51 UTC] PHP Fatal error: Uncaught Error: Call to undefined function of_get_option() in /var/www/html/assets/themes/underscore/header.php:37
Stack trace:
#0 /var/www/html/wp-includes/template.php(555): require_once()
#1 /var/www/html/wp-includes/template.php(514): load_template('/var/www/html/a...', true)
#2 /var/www/html/wp-includes/general-template.php(45): locate_template(Array, true)
#3 /var/www/html/assets/themes/underscore/index.php(1): get_header()
#4 /var/www/html/wp-includes/template-loader.php(75): include('/var/www/html/a...')
#5 /var/www/html/wp-blog-header.php(16): require_once('/var/www/html/w...')
#6 /var/www/html/index.php(17): require('/var/www/html/w...')
#7 {main}
thrown in /var/www/html/assets/themes/underscore/header.php on line 37
我很着急,所以我尝试将_get_option
函数的副本复制到文件中,以消除错误。
然后再向上弹出另一个。
[15-Dec-2017 00:29:35 UTC] PHP Warning: include_once(../wp-includes\option.php): failed to open stream: No such file or directory in /var/www/html/assets/themes/underscore/header.php on line 33
[15-Dec-2017 00:29:35 UTC] PHP Warning: include_once(): Failed opening '../wp-includes\option.php' for inclusion (include_path='.:/usr/share/php') in /var/www/html/assets/themes/underscore/header.php on line 33
[15-Dec-2017 00:29:35 UTC] PHP Fatal error: Uncaught Error: Call to undefined function WC() in /var/www/html/assets/themes/underscore/header.php:79
Stack trace:
#0 /var/www/html/wp-includes/template.php(555): require_once()
#1 /var/www/html/wp-includes/template.php(514): load_template('/var/www/html/a...', true)
#2 /var/www/html/wp-includes/general-template.php(45): locate_template(Array, true)
#3 /var/www/html/assets/themes/underscore/index.php(1): get_header()
#4 /var/www/html/wp-includes/template-loader.php(75): include('/var/www/html/a...')
#5 /var/www/html/wp-blog-header.php(16): require_once('/var/www/html/w...')
#6 /var/www/html/index.php(17): require('/var/www/html/w...')
#7 {main}
thrown in /var/www/html/assets/themes/underscore/header.php on line 79
任何人都知道这是为什么?
答案 0 :(得分:0)
themes/underscore/header.php
对另一个文件的引用不正确,这可能是一个问题/wp-includes\option.php