thinkphp5怎么访问php,thinkphp5 数据对象的访问

从tp3.2转到thinkphp5被tp5的返回的数据对象弄得焦头烂额.

打印request的信息

$request = thinkRequest::instance();

print_r($request);

返回的数据对象格式:

think\Request Object

(

[method:protected] => POST

[domain:protected] =>

[url:protected] =>

[baseUrl:protected] =>

[baseFile:protected] =>

[root:protected] =>

[pathinfo:protected] => index/index/delmulti.html

[path:protected] => index/index/delmulti

[routeInfo:protected] => Array

(

)

[env:protected] =>

[dispatch:protected] => Array

(

[type] => module

[module] => Array

(

[0] => index

[1] => index

[2] => delmulti

)

)

[module:protected] => index

[controller:protected] => Index

[action:protected] => delmulti

[langset:protected] => zh-cn

[param:protected] => Array

(

[id] => 1

)

[get:protected] => Array

(

)

[post:protected] => Array

(

[id] => 1

)

[request:protected] => Array

(

)

[route:protected] => Array

(

)

[put:protected] =>

[session:protected] => Array

(

)

[file:protected] => Array

(

)

[cookie:protected] => Array

(

)

[server:protected] => Array

(

)

[header:protected] => Array

(

[host] => localhost

[connection] => keep-alive

[content-length] => 4

[accept] => text/plain,

[__token__] => ff03c475943cb7db0a10c485000068b1

[x-requested-with] => XMLHttpRequest

[user-agent] => Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36

[origin] => http://localhost

[content-type] => application/x-www-form-urlencoded; charset=UTF-8

[referer] => http://localhost/NutCloud/demo/Frame/thinkphp5/public/

[accept-encoding] => gzip, deflate, br

[accept-language] => zh-CN,zh;q=0.9

[cookie] => thinkphp_show_page_trace=0|0; a3976_times=1; _ga=GA1.1.1623043278.1514942993; _gid=GA1.1.1822412755.1515375026; PHPSESSID=4q33f5j8i5i7s500g5lno8bd81

)

[mimeType:protected] => Array

(

[xml] => application/xml,text/xml,application/x-xml

[json] => application/json,text/x-json,application/jsonrequest,text/json

[js] => text/javascript,application/javascript,application/x-javascript

[css] => text/css

[rss] => application/rss+xml

[yaml] => application/x-yaml,text/yaml

[atom] => application/atom+xml

[pdf] => application/pdf

[text] => text/plain

[image] => image/png,image/jpg,image/jpeg,image/pjpeg,image/gif,image/webp,image/*

[csv] => text/csv

[html] => text/html,application/xhtml+xml,*/*

)

[content:protected] =>

[filter:protected] =>

[bind:protected] => Array

(

)

[input:protected] => id=1

[cache:protected] =>

[isCheckCache:protected] =>

)

我怎么获取[__token__]的值了?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值