PHP MySQLi函数在Linux上抛出解析错误,但在Windows上不抛出

I have a development server setup on my home office PC that is running Apache 2.4.3 with PHP 5.3.20 on Windows Server 2012. The other server is a Ubuntu Server 12.10 running Apache 2.4.2 with PHP 5.4.16. (yes, I see the version difference, except I can't find anything relating to this problem)

MySQLi is setup and replicated on both correctly, however, this line is not throwing any errors, or anything, however the page (and source code), stops at this line:

$id = mysqli_fetch_row($query)[0];

However it works on the Linux server. Am I missing an extension?

It works when I do:

$id = mysqli_fetch_row($query);
$id = $id[0];

Is there a way to enable the ability to combine the lines, without having to change everything?

Thanks.

查看全部
dongqishun6409
dongqishun6409
2013/07/07 17:06
  • linux
  • php
  • windows
  • compatibility
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

1个回复