duanhuantong8278 2012-08-29 19:39
浏览 68
已采纳

首次点击时PHP解析错误,然后分段错误[关闭]

I am trying to bring to life an old website for demonstration purposes. I am stuck with a PHP parse error and I can't find what it's about!

Here is the error I get (apache log) the first time I hit the page:

[error] [client 127.0.0.1] PHP Parse error:
parse error, expecting `T_STRING' or `'('' in .../functions.php on line 4

(the line return is for readability only) I end up with a 500 error.

Here is the only line I get the second time I hit the page:

[notice] child pid 3734 exit signal Segmentation fault (11)

This time I end up with a 324: ERR_EMPTY_RESPONSE.

Here is the code in the functions.php file, please don't look at the code it's very old ;).

<?php

// GoTo
function GoTo($page)
{
    global $FullPath;
    @header('Location:'.$FullPath.$page);
    echo "<script language='Javascript'>
                window.location='$page';
                </script>";
}

Do you see the parse error I am missing??

Why do I get a segfault the second time?

  • 写回答

2条回答 默认 最新

  • dongliaojing0554 2012-08-29 19:41
    关注

    You're using a newer version of PHP than you were when the site first came into existence, and goto has (sadly) been a keyword since PHP 5.3. Rename your function (:

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 做个有关计算的小程序
  • ¥15 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化