为什么Eclipse PHP不能识别命名空间声明? [英] Why is Eclipse PHP not recognizing namespace declarations?

查看:275
本文介绍了为什么Eclipse PHP不能识别命名空间声明?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我键入命名空间ORM时在Eclipse中,它强调了ORM的红色,并表示它期待一个括号。有没有办法让Eclipse识别命名空间?

解决方案

这可能是您的项目设置为 5.1 / 5.2 版本。您可以更改默认值:



窗口> 首选项> PHP > PHP Interpreter > PHP版本> 5.3



或者您可以在项目属性点击你的项目然后属性)然后 PHP解释器,勾选启用项目特定设置并更改 PHP版本那里。


When I type "namespace ORM;" in Eclipse, it underlines ORM in red and says that it is expecting a parenthesis. Is there a way to make Eclipse recognize namespaces?

解决方案

It's probably your project that is set to the 5.1/5.2 version. You can change the default in:

Window > Preferences > PHP > PHP Interpreter > PHP Version > 5.3

Alternatively you can go in Project Properties (right-click your project then Properties) then PHP Interpreter, tick Enable project-specific settings and change the PHP Version there.

这篇关于为什么Eclipse PHP不能识别命名空间声明?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆