thinkphp5的Illegal string offset 'id'错误

问题

解答

数组同名了,一个html页面传进来两个cateres的数组,所以在找id的时候不知道找这两个里面的哪一个

第一个$cateres数组

报错这里的

这个$cateres写在了控制器Base里面,其它的控制器都要继承它

第二个$cateres数组

这个$cateres写在了控制器Cate里面,加上继承的Base控制器里面的一个,所以有两个$cateres数组了。

thinkphp5的Illegal string offset 'id'错误的更多相关文章

  1. PHP7.1 报错 Warning Illegal string offset

    报错如下: Warning: Illegal string offset '阿根廷' in F:\wnmp\www\test.php on line 24 Warning: Illegal strin ...

  2. Android报“android.content.res.Resources$NotFoundException: String resource ID #0x2”错误

    Android报“android.content.res.Resources$NotFoundException: String resource ID #0x2”错误 当调用setText()方法时 ...

  3. android.content.res.Resources$NotFoundException:String resource ID #ffffffff

    无语,搞了半天,只能去插这个错误代号,结果就找到了这个结果. scoreTextView.setText(score+""); 这个一定要自己手动转换..不科学啊..关键是在ecl ...

  4. android.content.res.Resources$NotFoundException: String resource ID #0x1

    之前忘了记录这个错误,今天又遇到了.唉,人不能纵容自己犯懒,遂记录之. 错误:android.content.res.Resources$NotFoundException: String resou ...

  5. 异常 android.content.res.Resources$NotFoundException: String resource ID #0x61

    09-09 16:08:41.554: E/Weaver(13140):09-09 16:08:41.554: E/Weaver(13140): android.content.res.Resourc ...

  6. YII报错笔记:<pre>PHP Notice &#039;yii\base\ErrorException&#039; with message &#039;Uninitialized string offset: 0&#039; in /my/test/project/iot/vendor/yiisoft/yii2/base/Model.php:778

    YII常见报错笔记 报错返回的代码如下: <pre>PHP Notice 'yii\base\ErrorException' with message 'Uninitialized str ...

  7. Android Problem- android.content.res.Resources$NotFoundException: String resource ID #0xa

    在使用listview时出现错误android.content.res.Resources$NotFoundException: String resource ID #0xa 经查证是在调用Text ...

  8. android 使用Tabhost 发生could not create tab content because could not find view with id 错误

    使用Tabhost的时候经常报:could not create tab content because could not find view with id 错误. 总结一下发生错误的原因,一般的 ...

  9. (转载)android:android.content.res.Resources$NotFoundException: String resource ID #..

    android.content.res.Resources$NotFoundException: String resource ID #0x0 找不到资源文件ID #0x0 原因分析如下: 遇到这种 ...

随机推荐

  1. CSVHelper读出乱码 解决方案

    using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read)) using (StreamRe ...

  2. ASP.NET-js和C#混合编程的例子

    使用<text>这个伪元素来强制Razor从编译模式返回到内容模式: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ...

  3. 洛谷——P2822 组合数问题

    https://www.luogu.org/problem/show?pid=2822 题目描述 组合数C_n^mC​n​m​​表示的是从n个物品中选出m个物品的方案数.举个例子,从(1,2,3) 三 ...

  4. 仿hibernate,spring框架手动写

    近期学习了hibernate底层技术和spring 的底层技术,认为非常不错,所以想分享下,要是说的不够具体.能够去下载资源自己查看下载链接 技术的体现是在实际中的.如今大体介绍一下吧 首先介绍hib ...

  5. poj3249 Test for job 【图的DAG dp】

    #include <cstdio> #include <cstdlib> #include <iostream> #include <algorithm> ...

  6. 苹果要求全部新app以及版本号更新必须支持iOS 8 SDK和64-bit

    2014年10月20日.苹果官方公布了一则新闻,新闻内容例如以下: Starting February 1, 2015, new iOS apps uploaded to the App Store ...

  7. AutoCompleteTextView和Spinner的使用方法

    首先说明AutoCompleteTextView的使用方法.主要是起到自己主动填充的作用.输入keyword,假设存在该字便能够自己主动填充.代码例如以下 activity_main.xml < ...

  8. JAVA设计模式之【桥接模式】

    桥接模式 蜡笔中颜色和型号之间存在耦合 毛笔中,颜色和型号解耦了 如果软件系统中某个类存在两个独立变化的维度,桥接模式可以将两个维度分离出来 角色 抽象类 扩充抽象类 实现类接口 提供基本操作 抽象类 ...

  9. MetaSploit攻击实例讲解------社会工程学set攻击(kali linux 2016.2(rolling))(详细)

    不多说,直接上干货! 首先,如果你是用的BT5,则set的配置文件是在 /pentest/exploits/set/set_config下. APACHE_SERVER=ONSELF_SIGNED_A ...

  10. Codeforces 959E. Mahmoud and Ehab and the xor-MST 思路:找规律题,时间复杂度O(log(n))

    题目: 解题思路 这题就是0,1,2...n-1总共n个数字形成的最小生成树. 我们可以发现,一个数字k与比它小的数字形成的异或值,一定可以取到k与所有正整数形成的异或值的最小值. 要计算n个数字的情 ...