这么写是咋回事

WBOY
Release: 2016-06-13 12:19:38
Original
1060 people have browsed it

这么写是怎么回事
看到别人这么写
$veiryt=new \Think\home();
是不是写错了
------解决思路----------------------
$veiryt=new \Think\home();

实例化命名空间 Think 中的 home 类
显然这段代码不是在 Think 命名空间内,所以要 \Think 来指示位置
------解决思路----------------------
命名空间,php5.3之后就可以这样写

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template