( ! ) Warning: Invalid argument supplied for foreach() in F:\xampp\htdocs\zendfrm\application\views\scripts\index\index.phtml on line
46
Call Stack
#
Time
Memory
Function
Location
1 |
0.0025 |
340224 |
{main}( ) |
..\index.php:0 |
2 |
0.0512 |
3626240 |
Zend_Application->run( ) |
..\index.php:26 |
3 |
0.0512 |
3626240 |
Zend_Application_Bootstrap_Bootstrap->run( ) |
..\Application.php:366 |
4 |
0.0514 |
3626296 |
Zend_Controller_Front->dispatch( ???, ??? ) |
..\Bootstrap.php:97 |
5 |
0.0689 |
4936608 |
Zend_Controller_Dispatcher_Standard->dispatch( object(Zend_Controller_Request_Http)[17],
object(Zend_Controller_Response_Http)[18] ) |
..\Front.php:954 |
6 |
0.0850 |
5283280 |
Zend_Controller_Action->dispatch( string(11) ) |
..\Standard.php:295 |
7 |
0.0853 |
5286600 |
IndexController->indexAction( ) |
..\Action.php:516 |
8 |
0.1033 |
5725992 |
Zend_Controller_Action->render( string(5), ???, ??? ) |
..\IndexController.php:29 |
9 |
0.1037 |
5726216 |
Zend_Controller_Action_Helper_ViewRenderer->render( string(5),
null, bool ) |
..\Action.php:212 |
10 |
0.1060 |
5726352 |
Zend_Controller_Action_Helper_ViewRenderer->renderScript(
string(17), null ) |
..\ViewRenderer.php:921 |
11 |
0.1061 |
5726352 |
Zend_View_Abstract->render( string(17) ) |
..\ViewRenderer.php:900 |
12 |
0.1072 |
5767528 |
Zend_View->_run( string(67) ) |
..\Abstract.php:888 |
13 |
0.1077 |
5771416 |
include( 'F:\xampp\htdocs\zendfrm\application\views\scripts\index\index.phtml' ) |
..\View.php:108 |
( ! ) Notice: Array to string conversion in F:\xampp\htdocs\zendfrm\application\controllers\IndexController.php on line
24
Call Stack
#
Time
Memory
Function
Location
1
|
0.0025
|
340224
|
{main}( )
|
..\index.php:0
|
2
|
0.0512
|
3626240
|
Zend_Application->run( )
|
..\index.php:26
|
3
|
0.0512
|
3626240
|
Zend_Application_Bootstrap_Bootstrap->run( )
|
..\Application.php:366
|
4
|
0.0514
|
3626296
|
Zend_Controller_Front->dispatch( ???, ??? )
|
..\Bootstrap.php:97
|
5
|
0.0689
|
4936608
|
Zend_Controller_Dispatcher_Standard->dispatch( object(Zend_Controller_Request_Http)[17],
object(Zend_Controller_Response_Http)[18] )
|
..\Front.php:954
|
6
|
0.0850
|
5283280
|
Zend_Controller_Action->dispatch( string(11) )
|
..\Standard.php:295
|
7
|
0.0853
|
5286600
|
IndexController->indexAction( )
|
..\Action.php:516
|
将控制器中的 $this->view->$res=$res; 改为$this->view->res=$res; 它就像个session 赋与其名即可
//控制器中的一个函数
public function indexAction()
{
// action body
file_put_contents("d:/mylog.txt", __FILE__.date('y-m-d h:i:s')."index..\r\n",FILE_APPEND);
//如果什么都没有些,相当于有以下一句话;用view/scripts/index/index.phtml
$messageModel=new Message();
$res=$messageModel->fetchAll()->toArray();
//怎样把控制器获取的数据 array object int
$this->view->res=$res;
/* echo '<pre>';
print_r($res);
echo '</pre>';
*/
$this->render('index');
}
分享到:
相关推荐
然而,当尝试遍历一个非数组或非可迭代值时,会遇到“Warning: Invalid argument supplied for foreach()”的错误。这个错误表明你试图对一个非数组类型的变量使用 `foreach` 循环,而 `foreach` 需要一个数组或实现...
标题中的“apache启动报 shmget() failed: Invalid argument”是一个典型的Apache服务器启动错误,这个问题通常与系统级别的共享内存设置有关。下面将详细解释这个错误的原因、影响以及如何解决。 首先,`shmget()`...
在C++编程中,`std::invalid_argument` 是一个异常类,用于表示当函数或方法接收到不合法或无效的参数时抛出的错误。这个类是`std::logic_error` 的子类,而`std::logic_error` 又是`std::exception` 的子类。`std::...
在使用Git进行代码仓库克隆操作时,如果出现“sign_and_send_pubkey: signing failed: agent refused operation”的错误提示,意味着SSH代理拒绝了身份验证的操作。这通常发生在用户尝试通过SSH方式访问Git仓库时,...
Invalid Command Line Argument(解决方案).md
Invalid Multibyte Character Sequence 警告解析 在编程中,特别是在嵌入式系统开发中,我们经常会遇到Invalid Multibyte Character Sequence 警告。这个警告通常来自于编译器,告知我们存在非法的多字节字符序列。...
查看samba的版本是4版本的: [root@redhat_192.168.0.12 16:08:07 ~]#rpm -qa samba samba-4.9.1-6.el7.x86_64 找了好久,百度上一直都是mount命令加各种参数,确认了用户跟密码都没有问题,目录权限也都给了,最后...
在ROS(Robot Operating System)开发过程中,遇到`rlexception: invalid roslaunch xml syntax: no element found: line 1, column 0`这样的错误信息时,表明当前的`.launch`文件存在XML语法错误。具体来说,可能是...
NULL 博文链接:https://wilian.iteye.com/blog/1992365
***WARNING 16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS*** **问题描述:** 此警告表示`DelayX1ms()`函数未被任何代码调用,因此在最终的链接过程中将被忽略。 **解决方案:** - 如果不需要`DelayX1ms()`...
大家都知道foreach的参数如果不是数组类型,在运行的时候 就会出现类似“Warning: Invalid argument supplied for foreach() in XXX”warning信息。
本文实例讲述了Android模拟器无法启动,报错:Cannot set up guest memory ‘android_arm’: Invalid argument的解决方法。分享给大家供大家参考,具体如下: 【错误】 模拟器无法启动,报错:Cannot set up guest...
**正文** JSPDF 是一个流行的JavaScript库,用于在客户端生成PDF文档。...在Web应用程序中,这种功能尤其有用,因为它提供了从网页直接创建文档的便利性。 ...它使用了Canvas元素来渲染图形,同时支持SVG(Scalable ...
再和前台对接的时候一直报错:invalid url domain 在网上查找了很多资料,有说端口的问题,也有其它各种原因的,一大堆,最后我发现以上的说法都不准确,这是我配置的地址(错误的地址) 把配置地址的http://去掉...
在XML Schema设计中,"cvc-complex-type.2.4.d: Invalid content was found" 是一个常见的错误信息,这通常意味着在解析XML文档时,遇到了不符合定义的复杂类型的内容。这个错误通常涉及到XML Schema的约束规则,即...
ValueError: invalid literal for int() with base 10的错误 网上同样的错误有人建议用round(float(“1.0″)),但是解决不了我这个问题,round(float(“1.0″))是用于解决浮点数转换为整形数的, 而我这个则是因为...