【发布时间】:2010-06-24 17:34:51
【问题描述】:
所以我使用 PHPExcel (http://phpexcel.codeplex.com/) 来导入 Excel 工作表。在我的开发系统上一切正常,但在实时系统上却不太正常。
因此我进行了调试并查看了可能出现的问题。我发现一个方法显然返回 NULL,它应该返回一个对象。我查看了该方法,并var_dump()ed 方法中返回的 var。 var 不为空
伪代码:
class Bar()
{
function methodInAClass()
{
$test = new Foobar;
[...]
/* $test was an object here with a lot of data (var_dump()
* took around 100.000 lines in an editor) */
var_dump($test);
return $test;
}
}
$bar =& new Bar();
$test2 = $bar->methodInAClass(); //$test2 is NULL here
我做错了什么?这是来自 php.ini 的问题吗?
【问题讨论】:
标签: php memory codeplex phpexcel