douyou2368 2013-11-12 19:12
浏览 36
已采纳

如何解决ASCII = 92错误,是否可以在php 5.2服务器上运行laravel 4项目?

I am getting error like this ,

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/dolovers/public_html/bootstrap/autoload.php on line 46

and

Parse error: syntax error, unexpected T_STRING in /home/dolovers/public_html/bootstrap/autoload.php on line 46

My current version of web server php is 5.2 is that the reason for that ?

my second question is, Is is possible to run Laravel 4 projects on php 5.2 servers ? If not then what will be the good server to buy for laravel 4. And during its selection what should I take care of ?

  • 写回答

1条回答 默认 最新

  • dtd14883 2013-11-12 19:16
    关注

    The \ character is the namespace separator, and since Laravel 4 uses namespaces and PHP 5.2 does not support them, it triggers a syntax error and you cannot use Laravel 4 on that version of PHP.

    By the way, support for PHP 5.2 has been long since dropped, you should consider upgrading to the latest version of the 5.5.x branch.

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

报告相同问题?

悬赏问题

  • ¥15 51寻迹小车定点寻迹
  • ¥15 关于vue2中methods使用call修改this指向的问题
  • ¥15 idea自动补全键位冲突
  • ¥15 请教一下写代码,代码好难
  • ¥15 iis10中如何阻止别人网站重定向到我的网站
  • ¥15 滑块验证码移动速度不一致问题
  • ¥15 Utunbu中vscode下cern root工作台中写的程序root的头文件无法包含
  • ¥15 麒麟V10桌面版SP1如何配置bonding
  • ¥15 Marscode IDE 如何预览新建的 HTML 文件
  • ¥15 K8S部署二进制集群过程中calico一直报错