1.输出数字为001,002...
<?php $number=0; if($number<100) { $number=$number+1; $txt=sprintf("%03d",$number);//生成3位数,不足前面补0 echo $txt; } ?>