Php 获取wordpress主题的错误

Php 获取wordpress主题的错误,php,wordpress,themes,Php,Wordpress,Themes,我正在使用wordpress和自定义主题创建一个网站。我用XAMP在我的电脑上测试了这个网站,它运行得非常好。但当我将代码上传到网络主机时,它给出了以下错误: ERROR : Parse error: syntax error, unexpected '{' in /home/a5709387/public_html/wp-content/themes/gameaddict/themeOptions/functions.php on line 1 有人能帮忙吗?这是我的密码: <?php

我正在使用wordpress和自定义主题创建一个网站。我用XAMP在我的电脑上测试了这个网站,它运行得非常好。但当我将代码上传到网络主机时,它给出了以下错误:

ERROR : Parse error: syntax error, unexpected '{' in /home/a5709387/public_html/wp-content/themes/gameaddict/themeOptions/functions.php on line 1
有人能帮忙吗?这是我的密码:

<?php
if ( !function_exists( 'optionsframework_init' ) )
{
/*-----------------------------------------------------------------------------------*/
/* Options Framework Theme
/*-----------------------------------------------------------------------------------*/
/* Set the file path based on whether the Options Framework Theme is a parent theme or child theme */

        define('OPTIONS_FRAMEWORK_URL', get_template_directory() . '/themeOptions/admin/');
        define('OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/themeOptions/admin/');

require_once (OPTIONS_FRAMEWORK_URL . 'options-framework.php');
}
/*
 * This is an example of how to add custom scripts to the options panel.
 * This one shows/hides the an option when a checkbox is clicked.
 */
add_action('optionsframework_custom_scripts', 'optionsframework_custom_scripts');
function optionsframework_custom_scripts() { ?>
<script type="text/javascript">
jQuery(document).ready(function() {
        jQuery('#example_showhidden').click(function() {
                jQuery('#section-example_text_hidden').fadeToggle(400);
        });
        if (jQuery('#example_showhidden:checked').val() !== undefined) {
                jQuery('#section-example_text_hidden').show();
        }
});
</script>
<?php
}
/*
 * Turns off the default options panel from Twenty Eleven
 */
add_action('after_setup_theme','remove_twentyeleven_options', 100);
function remove_twentyeleven_options() {
        remove_action( 'admin_menu', 'twentyeleven_theme_options_add_page' );
}
?>

jQuery(文档).ready(函数(){
jQuery(“#示例_showhidden”)。单击(函数(){
jQuery('#section-example_text_hidden').fadeToggle(400);
});
if(jQuery('#示例_showhidden:checked').val()!==未定义){
jQuery('#section-example_text_hidden').show();
}
});

您的代码没有{第一行的可能性:1.您没有在此处提供主题代码/gameaddict/themeOptions/functions.php,但提供了另一个文件2.您的主机可能会自动向某些文件添加一些代码(您真的想使用免费主机吗?因为提供广告或窃取数据,这些文件仍然存在).从服务器下载你的文件,并检查它是否相同或更改。这只是为了测试,我会在网站完成后购买主机!PS是的,不知怎的,脚本被更改了,我的意思是所有的行都被转移到第一行(但分号和其他操作符仍然存在)!这是个问题吗?我想是的,如果你有错误:)nvm,问题是filezilla修改了脚本。我不得不从ASCII改为二进制,它得到了修复:)