print_r return BLANK PAGE

2019-08-13 03:39发布

I have a weird problem, I am using print_r($obj) in Joomla YOOtheme ZOO extension and it returns a blank page. it just act as die() !

it should output the object but it does not.

Please note that print_r() is working fine with some other objects and variables.

I am using XAMPP on Windows.

Any help?

Upon executing print_r() and var_dump(), the page is just blank, no error, view source shows:

<html>
  <head></head>
  <body></body>
</html>

Error reporting is turned on.

标签: php joomla xampp
3条回答
别忘想泡老子
2楼-- · 2019-08-13 03:57

It is posible that $obj is too big to load, and grabs a lot of memory after which the script stops to work.

Thanks

查看更多
做自己的国王
3楼-- · 2019-08-13 04:13

Is error reporting turned on?

If not add to your code:

ini_set("display_errors", "1");

查看更多
萌系小妹纸
4楼-- · 2019-08-13 04:21

If it's outputting nothing, $obj contains nothing. Try var_dump() instead. Also, make sure you're seeing all errors that PHP is producing:

ini_set('display_errors', 1);
error_reporting(-1);
查看更多
登录 后发表回答