lvfujun
V2EX  ›  问与答

PHP Namespace >>> new namespace\Class ??????

  •  
  •   lvfujun · Jan 18, 2015 · 2452 views
    This topic created in 4162 days ago, the information mentioned may be changed or developed.
    各位大牛
    \home\a.php
    a.php: content<<<start
    namespace aa;


    class bb{
    public function index(){
    }
    }
    End;



    include /home/a.php
    content<<<start

    include '/home/a.php'

    $class = new \aa\bb;
    $class->index():


    End;


    Error:<<<
    Fatal error: Class 'aa\Filters' not found i
    >>>

    求大牛看看问题所在.为什么不能new 命名空间的class!感谢!
    1 replies    2015-01-18 15:07:34 +08:00
    kookxiang
        1
    kookxiang  
       Jan 18, 2015
    aa\Filters
    你这里哪有Filters
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   955 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 20:08 · PVG 04:08 · LAX 13:08 · JFK 16:08
    ♥ Do have faith in what you're doing.