php namespace与use的问题
/test文件夹下建立c.php文件,内容
/下建立test.php文件,内容
nbsp;html public -//w3c//dtd xhtml 1.0 transitional//en http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd>
无标题文档
test();
echo
;
?>
运行错误:
( ! ) scream: error suppression ignored for
( ! ) fatal error: class 'c' not found in e:\hongyunlai\thinkphp32\test.php on line 14
call stack
# time memory function location
1 0.0006 247520 {main}( ) ..\test.php:0
------解决方案--------------------
你的命名空间是 test\driver
$c=new driver\c(); 只需取命名空间的最后一节即可