문제

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