测试 api 时,我们常用到的数据类型有数组,数组中就存在下标的问题。
习惯,php 中的关联索引数组的下标,都是必须是单引号或双引号的括住方式 :
['week' => '']
``
可是在postman 里边,是不能如此定义数组的。它要求的不允许带有单引号。
![postman.png](https://img.haomeiwen.com/i11218/623a655623817978.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
带有单引号,传送到服务器,打印输出的结果如下:
![postman2.png](https://img.haomeiwen.com/i11218/2c6aee0e7e3abaa2.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
网友评论