使用eclipse for php这个编辑器来写PHP,为了利于大型开发,使用了php最新支持的命名空间namespace,但不知是否这个编辑器不支持namespac这个关键词,遇到使用namespace的代码行,都提示错误,这是怎么回事?期待解决方法!

解决方案 »

  1.   

    升级呀
    你的 eclipse for php 出生于 php5.3 之前,自然不能预知 php5.3 会支持命名空间的了
      

  2.   

    命名空间需要php5.3以上的版本才行的 看你的php是不是5.3以上的 升级下eclipse
      

  3.   

    解决了,原来eclipse for php有这个选择的,选择5.3的就支持namespace了:)
      

  4.   

    EclipsePHP Studio 简体中文版介绍 - EPP
      

  5.   

    嗯,是的,谢谢你,还有楼上的版主:)
    我现在的开发环境是apache2.4.7+php5.5.7,不知道eclipse for php有没有5.4或5.5的pdt了?
      

  6.   

    PHP 5.3
    The Eclipse and PHP communitites grow together. When one makes a change, the other takes a consequent action.
    When PHP announced it was going to deliver a new major version, Eclipse PHP Development Tools (PDT) reacted with an early that supports the new PHP 5.3 language features.
    Project Management The New PHP Project Wizard (available from the File | New menu) now has the additional option of projects supporting PHP 5.3
      

  7.   

    用zend studio吧
      

  8.   

    我的php 是5.5.12  可是还是不能用名称空间 ?