[英]Parse error: syntax error, unexpected '(', expecting T_STRING in --------------/admin.php on line 26
i uploaded file but it show error. 我上传了文件,但显示错误。
Parse error: syntax error, unexpected '(', expecting T_STRING in ///admin.php on line 26 how can fix this error?
解析错误:语法错误,意外的'(',期望在第26行的///admin.php中出现T_STRING,如何解决此错误?
line is 线是
function index($success){
include("header.php");
global $link,$prefix;
if (isset($success)) {
openTable();
echo "<center><font color='#FF0000'>$success</font><center><br>";
closeTable();
echo"<br>";
goto("index.php?file=admin");/ error line
}
Please refer PHP manual for goto
here: http://php.net/manual/en/control-structures.goto.php 请
goto
参考PHP手册: http : //php.net/manual/en/control-structures.goto.php
goto
is used to shift execution to a different point in the same code file and you need to specify an identifier for another location in your code in the same file (refer to the example given in the PHP manual link). goto
用于将执行转移到同一代码文件中的另一点,并且您需要为同一文件中代码中的其他位置指定标识符(请参阅PHP手册链接中给出的示例)。 If you want to go to another link, use header()
method instead. 如果要转到另一个链接,请改用
header()
方法。
header("Location:index.php?file=admin");
Manual here: http://php.net/manual/en/function.header.php 此处的手册: http : //php.net/manual/zh/function.header.php
I've never used goto, but I just looked it up in the manual and they never used brackets around the destination. 我从未使用过goto,但我只是在手册中进行了查找,他们也从未在目的地周围使用方括号。 However if you want to redirect to another page, I think you're using the wrong method.
但是,如果您想重定向到另一个页面,我认为您使用的是错误的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.