donglin7383 2014-07-21 11:17
浏览 229
已采纳

Laravel安装上的PHP解析错误

After installing Laravel and updating Composer, I get a weird PHP syntax error in my PHP error logs:

PHP Parse error: syntax error, unexpected '.' in /Applications/MAMP/htdocs/scandipage/public/index.php on line 21

Line 21 of index.php:

require __DIR__.’/../bootstrap/autoload.php';

Already checked PHP version on my Mac (PHP 5.5.10 (cli) (built: Apr 10 2014 17:49:22) ). What else could be the reason for this error?

  • 写回答

1条回答 默认 最新

  • doudiaozhi6658 2014-07-21 11:18
    关注

    Your single quote doesn't look right (note the difference at the first opening quote). Try replace line 21 with this:

    require __DIR__.'/../bootstrap/autoload.php';
    

    It feels a little uncomfortable to me that a default file from Laravel does this. You may want to reclone your project again.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog