函数第 1 行中出现 WordPress 错误意外T_VARIABLE.php


Wordpress error unexpected T_VARIABLE in line 1 of functions.php

自从我在 functions.php 中编写了一个函数以来,我就遇到了这个错误。我什至删除了它并将我的备份文件从FTP上传到服务器。

它仍然显示相同的错误。WordPress论坛上的人不知道到底需要做什么。

请帮助,因为它在我的客户实时网站上。

Parse error: syntax error, unexpected T_VARIABLE in /home/content/90/10424790/html/waytofabulous/wp-content/themes/custom/functions.php on line 1

前 10 行代码:

  <?php
if ( ! isset( $content_width ) )
    $content_width = 604;
require get_template_directory() . '/inc/custom-header.php';
if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) )
    require get_template_directory() . '/inc/back-compat.php';
?>

请删除标签前<?php空格

if ( ! isset( $content_width ) )
    $content_width = 604;
require get_template_directory() . '/inc/custom-header.php';
if ( version_compare( $GLOBALS['wp_version'], '3.6-alpha', '<' ) )
    require get_template_directory() . '/inc/back-compat.php';
?>