# 调试接口

直接访问域名,您会打开站点的web端页面;前后端代码分离,但默认情况下前后端的部署是不分离的,您需要使用特别的方式来直接访问接口。

# 方案一:URL加参

# 假设要调试的接口为
http://localhost:8000/admin/index/index

# 加参后为
http://localhost:8000/admin/index/index?server=1

# 方案二:请求加header

需要加的header同样为server=1,这也是BuildAdmin自身的web端请求接口的方式。

# 方案三:URLindex.php

# 假设要调试的接口为
http://localhost:8000/admin/index/index

# 加 index.php 后为
http://localhost:8000/index.php/admin/index/index