문제

The problem is pretty simple and annoying. I want to print as response just a '0' string, a zero value, nothing else.

I tried with:

exit(0);
exit('0');
exit("0");
echo "0";

$foo = '0';
exit($foo);

exit(intval('0'));

It always comes out with a null response. The same on PHP 4, 5.2 & 5.3. It's driving me crazy.

UPDATE:

<?php
die("0");
?>
도움이 되었습니까?

해결책

Well, the problem was not in my pecies of code. I emailed my hosting support which could reproduce it successfully. The only way was to move to a different kind of output in order to get it diaplyed correctly.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top