0
我是新来使用名称空间,并试图重新编写一些旧的代码来使用名称空间。PHP扩展使用名称空间
我当前文件夹结构如下:
library
| - App
| - - Service
| - - - IService.php
| - MyApp
| - - Service
| - - - Test.php
为test.php的类用于这个样子:
class MyApp_Service_Test extends App_Service_IService
,但我想实现的命名空间,并调整它我的错误日志显示如下:
Fatal: Class 'library\MyApp\Service\library\Api\Service\IService' not found
不过我也有IService试图这样做:
namespace library\App\Service
class IService
,改变test.php的到
class Test extends IService
我知道我在做这完全错了,但一些方向将不胜感激!