You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
下载最新的框架后。什么都都没有修改,在src的api的user中调用domain层,但是提示没有找到
api层的代码如下:
$domain = new \Domain_User();
$userInfo = $domain->getUserInfo() ;
print_r($userInfo) ;exit ;
在Domain层中,创建User.php文件类名:Domain_user,方法未getUserInfo().代码如下:
class Domain_User
{
public function getUserInfo(){
return [1,2] ;
}
}
按照文档和案例来看,应该没有什么问题,但是提示就是找不到
Fatal error: Uncaught Error: Class 'Domain_User' not found in D:\WWW\phalapi\src\app\Api\User.php:28
Stack trace:
#0 [internal function]: App\Api\User->login() #1 D:\WWW\phalapi\vendor\phalapi\kernal\src\PhalApi.php(53): call_user_func(Array) #2 D:\WWW\phalapi\public\index.php(9): PhalApi\PhalApi->response() #3 {main}
thrown in D:\WWW\phalapi\src\app\Api\User.php on line 28
The text was updated successfully, but these errors were encountered:
下载最新的框架后。什么都都没有修改,在src的api的user中调用domain层,但是提示没有找到
api层的代码如下:
$domain = new \Domain_User();
$userInfo = $domain->getUserInfo() ;
print_r($userInfo) ;exit ;
在Domain层中,创建User.php文件类名:Domain_user,方法未getUserInfo().代码如下:
class Domain_User
{
public function getUserInfo(){
return [1,2] ;
}
}
按照文档和案例来看,应该没有什么问题,但是提示就是找不到
Fatal error: Uncaught Error: Class 'Domain_User' not found in D:\WWW\phalapi\src\app\Api\User.php:28
Stack trace:
#0 [internal function]: App\Api\User->login()
#1 D:\WWW\phalapi\vendor\phalapi\kernal\src\PhalApi.php(53): call_user_func(Array)
#2 D:\WWW\phalapi\public\index.php(9): PhalApi\PhalApi->response()
#3 {main}
thrown in
D:\WWW\phalapi\src\app\Api\User.php on line
28
The text was updated successfully, but these errors were encountered: