lvfujun
V2EX  ›  问与答

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

  •  
  •   lvfujun · Jan 18, 2015 · 2712 views
    This topic created in 4335 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
    kookxiang
    Jan 18, 2015
    1
    aa\Filters
    你这里哪有Filters
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4326 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 09:00 · PVG 17:00 · LAX 01:00 · JFK 04:00
    ♥ Do have faith in what you're doing.