Home > Article > Backend Development > 关于 namespace 和 use的报错,该怎么处理
关于 namespace 和 use的报错
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> <?php #test.class.php namespace myNamespace; class MyClass { public function Show(){ echo "hello"; } } ?>
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> <?php #index.php require_once "test.class.php"; $c1 = new myNamespace::MyClass(); $c1->Show(); ?>