質問

This is a strange bug I've come across when switching my code over from 000webhost to ipage. It's the same code and a consistently different result.

The following example does nothing.

echo 0;

This example gives us '00'

echo 0;
echo 0;
役に立ちましたか?

解決

Seems to be a problem with ipage's host. This is my current workaround. This workaround echoes 00 instead of 0, and the correct integer with no leading 0 otherwise.

if(empty($count[0])) echo 0; // Don't get why we need this--not needed on 000webhost, e.g.
echo $count[0];

Update: confirmed bug on ipage's end

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top