thinkphp5 同一頁下的類別無法實例化?
使用thinkphp5的時候,在同一個頁面下
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | <code> namespace app\index\model;
use think\Model;
class Firstrow{
public function mainChoose( $target , $behaviour ){
$tableName = $target . 'model' ;
$openGate = new $tableName ();
return $result = $openGate -> $behaviour ();
}
}
class adminsmodel extends Model{
protected $table = 'admins' ;
public function nihao(){
$result = $this ->select()->collection()->toArray();
return $result ;
}
}</code>
|
但是系統一直提示找不到adminsmodel類別
我懷疑過是命名空間的問題,但是一時間也沒有解決方法,麻煩大家解答一下我的疑問了
迷茫2864 天前533