if (strlen($filename) > 70) { //trim the string to 70 chars //delete chars from the beginning! }
what method do i use.
rega开发者_运维知识库rds matt
$filename = substr($filename, -70);
to get the last chars from a string:
substr($string, -70);
first 70 chars:
substr($string, 0, 70);
but, of course, you could check php docs for more info.
精彩评论