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条)

报告相同问题?

悬赏问题

  • ¥30 数字信号处理实验报告
  • ¥15 ensp路由器启动不了一直报#
  • ¥50 安卓10如何在没有root权限的情况下设置开机自动启动指定app?
  • ¥15 ats2837 spi2从机的代码
  • ¥200 wsl2 vllm qwen1.5部署问题
  • ¥100 有偿求数字经济对经贸的影响机制的一个数学模型,弄不出来已经快要碎掉了
  • ¥15 数学建模数学建模需要
  • ¥15 已知许多点位,想通过高斯分布来随机选择固定数量的点位怎么改
  • ¥20 nao机器人语音识别问题
  • ¥15 怎么生成确定数目的泊松点过程