语法错误,意外的T_GOTO,预期为T_STRING [英] syntax error, unexpected T_GOTO, expecting T_STRING

查看:113
本文介绍了语法错误,意外的T_GOTO,预期为T_STRING的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将网站移到了另一个主机上.以前的php版本是5.2,现在是5.3 当我登录到我的网站时,它显示错误:

I moved my website to another host. The previous php version is 5.2 and now is 5.3 When I login to my website, it shows the error:

Parse error: syntax error, unexpected T_GOTO, expecting T_STRING in /xx/xx/xx/xx on line xx

以下是代码,第一行是错误行:

Following is the code, the first line is the error line:

    function goto($URL= "Back",$Target="self") //the error line
{
    if ($URL == "Back")
    {
        echo "<HTML>\n<HEAD>\n<TITLE> untitle </TITLE>\n<meta http-equiv=\"Content-Type\"  content=\"text/html; charset={$this -> Charset}\">\n</HEAD>\n<BODY>\n";
        echo "<Script Language=\"Javascript\">history.go(-1)</Script>";
        echo "\n</body></html>";
    }
    elseif

我应该如何更改语法?非常感谢!

How should I change my syntax? Thanks a lot!

推荐答案

将函数重命名为"goto"以外的名称.那是保留名称.

rename your function to something other than "goto". That is a reserved name.

这篇关于语法错误,意外的T_GOTO,预期为T_STRING的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆