1. deldot deldot函数为upload-lab中一个常见的函数,它实际为一个自定义函数,定义于common.php中,函数定义如下: function deldot($s){ for($i = strlen($s)-1;$i>0;$i--){ $c = substr($s,$i,1); if($i == strlen($s)-1 and $c != '.'){ return $s; } if($c != '.'){ return substr($s,0,$i+1); } } } 1 2 3 4 5 6 7 8 9 10 11 12 即从字符串的尾部开始,从后向前删除点.,直到该字符串的末尾字符不是.为止。