Home > Backend Development > PHP Tutorial > PHP命名空间 能用 ../abc 这种路径吗?

PHP命名空间 能用 ../abc 这种路径吗?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:06:51
Original
1072 people have browsed it

就是引用父空间的 方法,函数:
我试了试不行,也不知道真不行,还是自己写错了..

<code><?php namesapce a\b;
//★★这里怎么引用下面那个 say?



<?php
namesapce a;
function say()
{
}</code></code>
Copy after login
Copy after login

回复内容:

就是引用父空间的 方法,函数:
我试了试不行,也不知道真不行,还是自己写错了..

<code><?php namesapce a\b;
//★★这里怎么引用下面那个 say?



<?php
namesapce a;
function say()
{
}</code></code>
Copy after login
Copy after login

<code><?php namesapce a\b;

use a\say;

say();</code></code>
Copy after login
Related labels:
php
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template