文件名: test.php 获取拓展名(php)的方法: 1.strrchr($filename, .); 2.substr($filename, strrpos($filename, .)) 3.array_pop(explode(., $filename)); 4.$p = pathinfo($filename); echo $p[extension]; 参考: 1.http://www.phpddt.com/php/761.html 2.
文件名: test.php
获取拓展名(php)的方法:
1.strrchr($filename, '.'); 2.substr($filename, strrpos($filename, '.')) 3.array_pop(explode('.', $filename)); 4.$p = pathinfo($filename); echo $p['extension'];
参考:
1. http://www.phpddt.com/php/761.html
2. http://www.phpddt.com/php/php-sina-test.html